Skip to main content

IndexedScriptableObject

An abstract class in Root.Township, Alta.Static.

Base for asset types that have a fixed numeric index, such as StaticEnvironmentPiece, so they can be sent and loaded by number.

Constructors​

MemberWhat it is
protected IndexedScriptableObject()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private uint indexBacking field for Index.
private static bool isInOnValidateLoopUnused in this build.

Properties​

MemberWhat it is
uint Index { get; }The asset's index, set in the asset.
virtual Type Key { get; }The type the index belongs to; by default the asset's own type.

Methods​

MemberWhat it is
protected virtual void OnValidate()Editor hook; does nothing in this build.