Class Component<T>
A Node that represents UnityEngine.Component.
Inherited Members
Namespace: Mux.Markup
Assembly: Mux.Markup.dll
Syntax
public class Component<T> : Node, INotifyPropertyChanged, IDynamicResourceHandler where T : UnityEngine.Component
Type Parameters
Name | Description |
---|---|
T |
Fields
| Improve this Doc View SourceBodyProperty
Backing store for the Body property.
Declaration
public static readonly BindableProperty BodyProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
| Improve this Doc View SourceBody
A property to get or set the underlaying UnityEngine.Component.
Declaration
public T Body { get; protected set; }
Property Value
Type | Description |
---|---|
T |
Remarks
It is expected to be used to bind the UnityEngine.Component to properties of other Node. It causes unpredictable results to using this property for other purposes.
Methods
| Improve this Doc View SourceAddToInMainThread(UnityEngine.GameObject)
A method that actually adds the node to UnityEngine.GameObject in the main thread.
Declaration
protected override void AddToInMainThread(UnityEngine.GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | gameObject |
Overrides
Remarks
The caller must call this method in the main thread.
AwakeInMainThread()
A methot that actually wakes the node up in the main thread.
Declaration
protected override void AwakeInMainThread()
Overrides
Remarks
The caller must call this method in the main thread after calling AddToInMainThread(UnityEngine.GameObject).
CreateBindableModifierProperty(String, Type, BindableProperty.CreateDefaultValueDelegate)
A convenient method to create a new instance of the BindableProperty class that represents Component<T>.Modifier.
Declaration
protected static BindableProperty CreateBindableModifierProperty(string property, Type declarer, BindableProperty.CreateDefaultValueDelegate defaultValueCreator)
Parameters
Type | Name | Description |
---|---|---|
String | property | The name of the BindableProperty. |
Type | declarer | The type of the declaring object. |
BindableProperty.CreateDefaultValueDelegate | defaultValueCreator | A Func used to initialize default value for reference types. |
Returns
Type | Description |
---|---|
BindableProperty |
Remarks
This sets Body property and lets Component<T>.Modifier inherit BindingContext. Those states must be maintained by the caller.