This document is about: QUANTUM 1
SWITCH TO

Extending Abstract Quantum Asset Tips

You can disable linking script and reset method generation by attaching the following to the asset script.

This will allow you to not generate the intermediary asset class.

C#

    [AssetObjectConfig(GenerateAssetCreateMenu = true, GenerateAssetResetMethod = true, GenerateLinkingScripts = true)]

Inspired by this question from Benjamin-SEM:

Benjamin-SEM: Question about generic in asset classes: I'd like to have a MyStuff : Asset. Unsurprisingly, QTN doesn't support that, but that's just a matter of having a base class:

asset

abstract class MyStuff<T> : MyStuffBase
class MyConcreteStuff : MyStuff<Foo>

That works fine in Quantum but it breaks the Unity-side generation of the associated scriptableobject classes, since MyStuffAsset is not a very nice class name (actually it tries to declare MyStuff'1Asset, but same issue).

So, long shot, but is there a way to tell the codegen to NOT generate an intermediate asset class in Unity? I'd be perfectly fine with having only MyStuffBaseAsset : AssetBase and MyConcreteStuffAsset : MyStuffBaseAsset available in Unity.

Back to top