Class FloatCurve
A type of ICurve that stores keyframes of type float.
Namespace: Unity.LiveCapture
Syntax
public class FloatCurve : object, ICurve<float>, ICurve
Constructors
FloatCurve(String, String, Type)
Constructs an instance of FloatCurve.
Declaration
public FloatCurve(string relativePath, string propertyName, Type bindingType)
Parameters
Type | Name | Description |
---|---|---|
String | relativePath | Path to the game object this curve applies to. |
String | propertyName | The name or path to the property being animated. |
Type | bindingType | The class type of the component that is animated. |
Properties
BindingType
The type of the property to be animated.
Declaration
public Type BindingType { get; }
Property Value
Type | Description |
---|---|
Type |
Implements
FrameRate
The sampling rate in Hz.
Declaration
public FrameRate FrameRate { get; set; }
Property Value
Type | Description |
---|---|
FrameRate |
Implements
PropertyName
The name of the property to be animated.
Declaration
public string PropertyName { get; }
Property Value
Type | Description |
---|---|
String |
Implements
RelativePath
The transform path of the object that is animated.
Declaration
public string RelativePath { get; }
Property Value
Type | Description |
---|---|
String |
Implements
Methods
AddKey(Double, Single)
Adds a keyframe to the curve.
Declaration
public void AddKey(double time, float value)
Parameters
Type | Name | Description |
---|---|---|
Double | time | The time in seconds to insert the keyframe at. |
Single | value |
Implements
Clear()
Clears the keyframes from the curve.
Declaration
public void Clear()
Implements
IsEmpty()
Checks if the animation curve contains keyframes.
Declaration
public bool IsEmpty()
Returns
Type | Description |
---|---|
Boolean | true if the curve contains no keyframes; otherwise, false. |
Implements
SetToAnimationClip(AnimationClip)
Sets the curve to the given animation clip.
Declaration
public void SetToAnimationClip(AnimationClip clip)
Parameters
Type | Name | Description |
---|---|---|
AnimationClip | clip | The animation clip to set the curve to. |