Struct FloatProperty
Float property handle used to read and write values in the AnimationStream.
Namespace: UnityEngine.Animations.Rigging
Syntax
public struct FloatProperty : IAnimatableProperty<float>
Fields
value
The PropertyStreamHandle used in the AnimationStream.
Declaration
public PropertyStreamHandle value
Field Value
Type | Description |
---|---|
PropertyStreamHandle |
Methods
Bind(Animator, Component, String)
Creates a FloatProperty handle representing a property binding on a Component.
Declaration
public static FloatProperty Bind(Animator animator, Component component, string name)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The Animator on which to bind the new handle. |
Component | component | The Component owning the parameter. |
String | name | The property name |
Returns
Type | Description |
---|---|
FloatProperty | Returns a FloatProperty handle that represents the new binding. |
BindCustom(Animator, String)
Creates a FloatProperty handle for a custom property in the AnimationStream to pass extra data to downstream animation jobs in the graph.
Declaration
public static FloatProperty BindCustom(Animator animator, string property)
Parameters
Type | Name | Description |
---|---|---|
Animator | animator | The Animator on which to bind the new handle. |
String | property | The name of the property. |
Returns
Type | Description |
---|---|
FloatProperty | Returns a FloatProperty handle that represents the new binding. |
Get(AnimationStream)
Gets the property value from a stream.
Declaration
public float Get(AnimationStream stream)
Parameters
Type | Name | Description |
---|---|---|
AnimationStream | stream | The AnimationStream that holds the animated values. |
Returns
Type | Description |
---|---|
Single | The float property value. |
Implements
Set(AnimationStream, Single)
Sets the property value into a stream.
Declaration
public void Set(AnimationStream stream, float v)
Parameters
Type | Name | Description |
---|---|---|
AnimationStream | stream | The AnimationStream that holds the animated values. |
Single | v | The new float property value. |