Class ReferenceItem<T>
An abstract generic RuntimeObject which encapsulates a given reference type. Inherit from this class to create your own RuntimeReference sub class. Give your class the CreateAssetMenu attribute to serialize an instance of it.
Implements
Inherited Members
Namespace: ScriptableFramework
Assembly: cs.temp.dll.dll
Syntax
public abstract class ReferenceItem<T> : RuntimeItem<T>, IReferenceContainer where T : class
Type Parameters
Name | Description |
---|---|
T | A class (reference type) object to be stored in this asset. |
Fields
forAssetReferencingOnly
If true, the items
property will not be cleared on application start.
This is useful when wanting a persistent reference to another asset rather than a runtime
reference to an object in a scene.
Declaration
protected bool forAssetReferencingOnly
Field Value
Type | Description |
---|---|
System.Boolean |
reference
The reference type obect being stored.
Declaration
public T reference
Field Value
Type | Description |
---|---|
T |
Properties
ForAssetReferencingOnly
Toggle this on to ensure that the object ignores all calls for either clearing or reseting its reference(s).
Declaration
public bool ForAssetReferencingOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Clear()
Set value to null rather can create a new instance to avoid issues like instantiating new objects. If marked for asset referencing only, the data will not be cleared.
Declaration
public override void Clear()