Class Property<T>
Generic property implementation.
Inheritance
Property<T>
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Namespace: Global Namespace
Syntax
[Serializable]
[AddComponentMenu("Properties")]
public class Property<T> : IProperty
Type Parameters
| Name | Description |
|---|---|
| T | Underlying data type of the property. |
Constructors
Property()
Default init.
Declaration
public Property()
Fields
data
Port type created used the data type provided. If this port cannot serialize properly then the property will not work.
Declaration
public PortType<T> data
Field Value
| Type | Description |
|---|---|
| PortType<T> |
Properties
Port
Reference to the port.
Declaration
public override IPortType Port { get; }
Property Value
| Type | Description |
|---|---|
| IPortType | The port. |
Overrides
Methods
GetKey()
Gets the key that defines this component attachment, the key is used to identify the component in a map.
Declaration
public override string GetKey()
Returns
| Type | Description |
|---|---|
| String | Custom Key for that component attachment |
Overrides
OnValidate()
Implement for behaviour on property data change.
Declaration
public override void OnValidate()
Overrides
SetDefaultValue(String)
Set a default value using the serialized port json.
Declaration
public override void SetDefaultValue(string jsonPortValue)
Parameters
| Type | Name | Description |
|---|---|---|
| String | jsonPortValue |