Class BlackboardVariable<DataType>
A base class for blackboard variables serialized by value.
Inherited Members
Namespace: Unity.Behavior
Assembly: Unity.Behavior.dll
Syntax
[Serializable]
public class BlackboardVariable<DataType> : BlackboardVariable
Type Parameters
Name | Description |
---|---|
DataType | The type of value stored in the variable. |
Constructors
BlackboardVariable()
BlackboardVariable constructor.
Declaration
public BlackboardVariable()
BlackboardVariable(DataType)
BlackboardVariable constructor.
Declaration
public BlackboardVariable(DataType value)
Parameters
Type | Name | Description |
---|---|---|
Data |
value | Datatype |
Fields
m_Value
The value of the blackboard variable.
Declaration
[SerializeField]
protected DataType m_Value
Field Value
Type | Description |
---|---|
Data |
Properties
ObjectValue
see Object
Declaration
public override sealed object ObjectValue { get; set; }
Property Value
Type | Description |
---|---|
object |
Overrides
Type
see Type
Declaration
public override Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Overrides
Value
see Object
Declaration
public virtual DataType Value { get; set; }
Property Value
Type | Description |
---|---|
Data |
Methods
Equals(BlackboardVariable)
Declaration
public override bool Equals(BlackboardVariable other)
Parameters
Type | Name | Description |
---|---|---|
Blackboard |
other |
Returns
Type | Description |
---|---|
bool |
Overrides
SetObjectValueWithoutNotify(object)
Declaration
public override void SetObjectValueWithoutNotify(object newValue)
Parameters
Type | Name | Description |
---|---|---|
object | newValue |
Overrides
SetValueWithoutNotify(DataType)
Allow to set the value without being notified of the change, if any.
Declaration
public virtual void SetValueWithoutNotify(DataType newValue)
Parameters
Type | Name | Description |
---|---|---|
Data |
newValue | The new value to be assigned. |
ValueEquals(BlackboardVariable)
Returns true if the values of the two variables are equal and false otherwise.
Declaration
public override bool ValueEquals(BlackboardVariable other)
Parameters
Type | Name | Description |
---|---|---|
Blackboard |
other | The variable whose value is compared to. |
Returns
Type | Description |
---|---|
bool | Returns true if the values of the two variables are equal and false otherwise. |
Overrides
ValueEquals(BlackboardVariable<DataType>)
Returns true if the values of the two variables are equal and false otherwise.
Declaration
public bool ValueEquals(BlackboardVariable<DataType> other)
Parameters
Type | Name | Description |
---|---|---|
Blackboard |
other | The variable whose value is compared to. |
Returns
Type | Description |
---|---|
bool | Returns true if the values of the two variables are equal and false otherwise. |
Operators
explicit operator BlackboardVariable<DataType>(DataType)
Implicit conversion from DataType to BlackboardVariable.
Declaration
public static explicit operator BlackboardVariable<DataType>(DataType value)
Parameters
Type | Name | Description |
---|---|---|
Data |
value | Datatype value used to create a BlackboardVariable |
Returns
Type | Description |
---|---|
Blackboard |
Returns a Blackboard Variable with the given value. |
implicit operator DataType(BlackboardVariable<DataType>)
Implicit conversion from BlackboardVariable to DataType.
Declaration
public static implicit operator DataType(BlackboardVariable<DataType> value)
Parameters
Type | Name | Description |
---|---|---|
Blackboard |
value | The variable holding the DataType value |
Returns
Type | Description |
---|---|
Data |
Returns the value stored in the Blackboard Variable. |