Arbor 3: FSM & BT Graph Editor  3.5.0
Parameter Class Reference

Class of Parameter to be stored in the ParameterContainer. More...

Public Types

enum  Type {
  Int, Float, Bool, GameObject,
  String, Enum, Vector2 = 1000, Vector3,
  Quaternion, Rect, Bounds, Color,
  Transform = 2000, RectTransform, Rigidbody, Rigidbody2D,
  Component, Long, Variable = 3000
}
 Parameter type. More...
 

Public Member Functions

delegate void DelegateOnChanged (Parameter parameter)
 Delegate called when changing Parameter. More...
 
void OnChanged ()
 Call when you change the value. More...
 
bool SetEnum< TEnum > (TEnum value)
 Set Enum value More...
 
bool TryGetEnum< TEnum > (out TEnum value)
 Get the value of the Enum type. More...
 
void SetVariable< T > (T value)
 Set Variable value More...
 
bool GetVariable< T > (ref T value)
 Get Variable value More...
 
override string ToString ()
 Convert value to string format. More...
 
string ToString (string format)
 Convert value to string format. More...
 

Static Public Member Functions

static System.Type GetValueType (Parameter.Type type, System.Type referenceType=null)
 Get the value type of the parameter. More...
 

Public Attributes

ParameterContainerInternal container
 Container this parameter is stored. More...
 
int id
 ID. More...
 
Type type
 Type. More...
 
string name
 Name. More...
 
ClassTypeReference referenceType = new ClassTypeReference()
 the type of objectReferenceValue and Enum. More...
 

Properties

ClassTypeReference componentType [get, set]
 Component type More...
 
bool isPublicSet [get]
 Returns whether this parameter can be set from an external graph. More...
 
bool isPublicGet [get]
 Returns whether this parameter can be get from an external graph. More...
 
int intValue [get, set]
 Value of Int type. More...
 
long longValue [get, set]
 Value of Long type. More...
 
float floatValue [get, set]
 Value of Float type. More...
 
bool boolValue [get, set]
 Value of Bool type. More...
 
string stringValue [get, set]
 Value of String type. More...
 
bool isEnum [get]
 Returns whether this parameter is of type Enum. More...
 
System.Enum enumValue [get, set]
 Value of Enum type. More...
 
Vector2 vector2Value [get, set]
 Value of Vector2 type. More...
 
Vector3 vector3Value [get, set]
 Value of Vector3 type. More...
 
Quaternion quaternionValue [get, set]
 Value of Quaternion type. More...
 
Rect rectValue [get, set]
 Value of Rect type. More...
 
Bounds boundsValue [get, set]
 Value of Bounds type. More...
 
Color colorValue [get, set]
 Value of Color type. More...
 
Object objectReferenceValue [get, set]
 Value of Object type. More...
 
GameObject gameObjectValue [get, set]
 Value of GameObject type. More...
 
object variableValue [get, set]
 Value of Variable type. More...
 
System.Type valueType [get]
 Get value type. More...
 
object value [get, set]
 Get values according to type. More...
 

Events

DelegateOnChanged onChanged
 Callback function to be called when the value is changed. More...
 

Detailed Description

Class of Parameter to be stored in the ParameterContainer.

Member Enumeration Documentation

enum Type
strong

Parameter type.

Enumerator
Int 

Int type.

Float 

Float type.

Bool 

Bool type.

GameObject 

GameObject type.

String 

String type.

Enum 

Enum type.

Vector2 

Vector2 type.

Vector3 

Vector3 type.

Quaternion 

Quaternion type.

Rect 

Rect type.

Bounds 

Bounds type.

Color 

Color type.

Transform 

Transform type.

RectTransform 

RectTransform type.

Rigidbody 

Rigidbody type.

Rigidbody2D 

Rigidbody2D type.

Component 

Component type.

Long 

Long type.

Variable 

Variable type.

Member Function Documentation

delegate void DelegateOnChanged ( Parameter  parameter)

Delegate called when changing Parameter.

Parameters
parameterParameter
static System.Type GetValueType ( Parameter.Type  type,
System.Type  referenceType = null 
)
static

Get the value type of the parameter.

Parameters
typeType of parameter
referenceTypeReference type (used for Enum, Component, Variable)
Returns
Value type of the parameter
bool GetVariable< T > ( ref T  value)

Get Variable value

Template Parameters
TVariable value type
Parameters
valueValue
Returns
Succeeds if true, failure if false
Type Constraints
T :new() 
void OnChanged ( )

Call when you change the value.

bool SetEnum< TEnum > ( TEnum  value)

Set Enum value

Parameters
valueValue
Type Constraints
TEnum :struct 
void SetVariable< T > ( value)

Set Variable value

Template Parameters
TVariable value Type
Parameters
valueValue
Type Constraints
T :new() 
override string ToString ( )

Convert value to string format.

Returns
Converted string
string ToString ( string  format)

Convert value to string format.

Parameters
formatNumeric format string (Int, Long, Float only)
Returns
Converted string

For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

bool TryGetEnum< TEnum > ( out TEnum  value)

Get the value of the Enum type.

Parameters
valueThe value you get.
Returns
Returns true if it succeeds.
Type Constraints
TEnum :struct 

Member Data Documentation

Container this parameter is stored.

int id

ID.

string name

Name.

ClassTypeReference referenceType = new ClassTypeReference()

the type of objectReferenceValue and Enum.

Type type

Type.

Property Documentation

bool boolValue
getset

Value of Bool type.

Bounds boundsValue
getset

Value of Bounds type.

Color colorValue
getset

Value of Color type.

ClassTypeReference componentType
getset

Component type

System.Enum enumValue
getset

Value of Enum type.

float floatValue
getset

Value of Float type.

GameObject gameObjectValue
getset

Value of GameObject type.

int intValue
getset

Value of Int type.

bool isEnum
get

Returns whether this parameter is of type Enum.

bool isPublicGet
get

Returns whether this parameter can be get from an external graph.

(For parameters in graph)

bool isPublicSet
get

Returns whether this parameter can be set from an external graph.

(For parameters in graph)

long longValue
getset

Value of Long type.

Object objectReferenceValue
getset

Value of Object type.

Quaternion quaternionValue
getset

Value of Quaternion type.

Rect rectValue
getset

Value of Rect type.

string stringValue
getset

Value of String type.

object value
getset

Get values according to type.

System.Type valueType
get

Get value type.

object variableValue
getset

Value of Variable type.

Vector2 vector2Value
getset

Value of Vector2 type.

Vector3 vector3Value
getset

Value of Vector3 type.

Event Documentation

DelegateOnChanged onChanged

Callback function to be called when the value is changed.