抽象的なQuantumアセットの拡張に関するヒント
スクリプトのリンクとリセットメソッドの生成を無効にするには、次のコードをアセットスクリプトに追加します。
これにより、中間アセットクラスを生成しないようにできます。
C#
[AssetObjectConfig(GenerateAssetCreateMenu = true, GenerateAssetResetMethod = true, GenerateLinkingScripts = true)]
Inspired by this question from Benjamin-SEM:
Back to topBenjamin-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 MyStuff
Asset 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.