Class SharedVariable
Variable can be shared between behaviors in behavior tree
public abstract class SharedVariable : ICloneable, IDisposable
- Inheritance
-
objectSharedVariable
- Implements
-
IDisposable
- Derived
Properties
IsExposed
Whether variable is exposed to editor
public bool IsExposed { get; set; }
Property Value
- bool
IsGlobal
Whether variable is global
public bool IsGlobal { get; set; }
Property Value
- bool
IsShared
Whether variable is shared
public bool IsShared { get; set; }
Property Value
- bool
Name
public string Name { get; set; }
Property Value
- string
Methods
Bind(SharedVariable)
Bind to other sharedVariable
public abstract void Bind(SharedVariable other)
Parameters
otherSharedVariable
Clone()
Clone shared variable by deep copy, an option here is to override for preventing using reflection
public virtual SharedVariable Clone()
Returns
Dispose()
Unbind self
public abstract void Dispose()
GetSerializedData()
public virtual SharedVariableData GetSerializedData()
Returns
GetValue()
public abstract object GetValue()
Returns
- object
GetValueType()
public virtual Type GetValueType()
Returns
- Type
Observe()
Create a observe proxy variable
public abstract ObserveProxyVariable Observe()
Returns
SetValue(object)
public abstract void SetValue(object newValue)
Parameters
newValueobject