Class VFXBinderBase
Base Class to derive in order to Write Visual Effect Binders
Inherited Members
Namespace: UnityEngine.VFX.Utility
Syntax
[ExecuteInEditMode]
[RequireComponent(typeof(VFXPropertyBinder))]
public abstract class VFXBinderBase : MonoBehaviour
Fields
binder
VFXPropertyBinder master behaviour this binder is attached to.
Declaration
protected VFXPropertyBinder binder
Field Value
Type | Description |
---|---|
VFXPropertyBinder |
Methods
Awake()
Awake Message : gets the master VFX Property Binder from this game object.
Declaration
protected virtual void Awake()
IsValid(VisualEffect)
Implement this method to perform validity checks:
- Visual Effect Implements correct Properties
- Objects to get values from are correctly set
Declaration
public abstract bool IsValid(VisualEffect component)
Parameters
Type | Name | Description |
---|---|---|
VisualEffect | component | the Visual Effect Componnent to bind properties to |
Returns
Type | Description |
---|---|
Boolean | Whether the binding can be performed |
OnDisable()
OnEnable Message : Removes this binding from the VFXPropertyBinder update loop
Declaration
protected virtual void OnDisable()
OnEnable()
OnEnable Message : Adds this binding in the VFXPropertyBinder update loop
Declaration
protected virtual void OnEnable()
Reset()
Optional method allowing potential manual state reset of binder
Declaration
public virtual void Reset()
ToString()
Returns a readable string summary of this Binder.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | a readable string summary of this Binder |
Overrides
UpdateBinding(VisualEffect)
Implement UpdateBinding to perform the actual binding. This method is called by the VFXPropertyBinder if IsValid() returns true;
Declaration
public abstract void UpdateBinding(VisualEffect component)
Parameters
Type | Name | Description |
---|---|---|
VisualEffect | component | The VisualEffect component to bind to |