AnimatedMaterialTiling.OnUpdate
Declaration
protected override void OnUpdate(float deltaTime)
Description
Handles updates of the animation behavior.
Parameters
deltaTime | The time since the last frame. |
diff --git a/com.zigurous.animation/404.html b/com.zigurous.animation/404.html index ebfc0da0f6..088986db30 100644 --- a/com.zigurous.animation/404.html +++ b/com.zigurous.animation/404.html @@ -1 +1 @@ -
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected virtual void Reset()
A Unity lifecycle method called when the behavior is reset in the editor.
protected virtual void Reset()
A Unity lifecycle method called when the behavior is reset in the editor.
public float animationSpeed
The tiling animation speed.
public float animationSpeed
The tiling animation speed.
public Vector2 axis
The tiling axis to animate on.
public Vector2 axis
The tiling axis to animate on.
public class AnimatedMaterialTiling : UpdateBehaviour
Animates the tiling property of a renderer's material.
renderer | The renderer to animate. |
animationSpeed | The tiling animation speed. |
axis | The tiling axis to animate on. |
Reset | A Unity lifecycle method called when the behavior is reset in the editor. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public class AnimatedMaterialTiling : UpdateBehaviour
Animates the tiling property of a renderer's material.
renderer | The renderer to animate. |
animationSpeed | The tiling animation speed. |
axis | The tiling axis to animate on. |
Reset | A Unity lifecycle method called when the behavior is reset in the editor. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public Renderer renderer
The renderer to animate.
public Renderer renderer
The renderer to animate.
public void Restart()
Restarts the animation to the first frame.
public void Restart()
Restarts the animation to the first frame.
public int frame { get; }
The current frame index (Read only).
public int frame { get; }
The current frame index (Read only).
public float frameRate
The amount of frames per second that are rendered.
public float frameRate
The amount of frames per second that are rendered.
public sealed class AnimatedSprite : MonoBehaviour
Animates a series of sprites over time.
spriteRenderer | The sprite renderer component for the animation (Read only). |
sprites | The sprites that are rendered throughout the animation, in order. |
frameRate | The amount of frames per second that are rendered. |
nextFrameTime | The time at which the next frame will begin (Read only). |
frame | The current frame index (Read only). |
reversed | Animates the sprites in reverse order. |
loop | Whether the animation should loop back to the start after cycling through each sprite. |
Restart | Restarts the animation to the first frame. |
public sealed class AnimatedSprite : MonoBehaviour
Animates a series of sprites over time.
spriteRenderer | The sprite renderer component for the animation (Read only). |
sprites | The sprites that are rendered throughout the animation, in order. |
frameRate | The amount of frames per second that are rendered. |
nextFrameTime | The time at which the next frame will begin (Read only). |
frame | The current frame index (Read only). |
reversed | Animates the sprites in reverse order. |
loop | Whether the animation should loop back to the start after cycling through each sprite. |
Restart | Restarts the animation to the first frame. |
public bool loop
Whether the animation should loop back to the start after cycling through each sprite.
public bool loop
Whether the animation should loop back to the start after cycling through each sprite.
public float nextFrameTime { get; }
The time at which the next frame will begin (Read only).
public float nextFrameTime { get; }
The time at which the next frame will begin (Read only).
public bool reversed
Animates the sprites in reverse order.
public bool reversed
Animates the sprites in reverse order.
public SpriteRenderer spriteRenderer { get; }
The sprite renderer component for the animation (Read only).
public SpriteRenderer spriteRenderer { get; }
The sprite renderer component for the animation (Read only).
public Sprite[] sprites
The sprites that are rendered throughout the animation, in order.
public Sprite[] sprites
The sprites that are rendered throughout the animation, in order.
public AnimatorParameter(string name)
Creates a new animator parameter with the given name.
name | The name of the animator parameter. |
public AnimatorParameter(string name)
Creates a new animator parameter with the given name.
name | The name of the animator parameter. |
public readonly int hash { get; }
The hash id of the animator parameter (Read only).
public readonly int hash { get; }
The hash id of the animator parameter (Read only).
[Serializable]
-public struct AnimatorParameter
An animation parameter that can be set on an Animator. A hash id is automatically created for the parameter. Ids are used for optimized setters and getters on Animator parameters.
hash | The hash id of the animator parameter (Read only). |
name | The name of the animator parameter. |
AnimatorParameter | Creates a new animator parameter with the given name. |
Implicit | Implicitly converts a name to an animator parameter. |
[Serializable]
+public struct AnimatorParameter
An animation parameter that can be set on an Animator. A hash id is automatically created for the parameter. Ids are used for optimized setters and getters on Animator parameters.
hash | The hash id of the animator parameter (Read only). |
name | The name of the animator parameter. |
AnimatorParameter | Creates a new animator parameter with the given name. |
Implicit | Implicitly converts a name to an animator parameter. |
public string name { get; set; }
The name of the animator parameter.
public string name { get; set; }
The name of the animator parameter.
public static implicit operator AnimatorParameter(string name)
Implicitly converts a name to an animator parameter.
name | The name of the animator parameter. |
AnimatorParameter | A new animator parameter with the given name. |
public static implicit operator int (AnimatorParameter property)
Implicitly converts an animator parameter to a hash id.
property | The animator parameter to convert to an id. |
int | The hash id of the animator parameter. |
public static implicit operator AnimatorParameter(string name)
Implicitly converts a name to an animator parameter.
name | The name of the animator parameter. |
AnimatorParameter | A new animator parameter with the given name. |
public static implicit operator int (AnimatorParameter property)
Implicitly converts an animator parameter to a hash id.
property | The animator parameter to convert to an id. |
int | The hash id of the animator parameter. |
public static implicit operator AnimatorParameter(string name)
Implicitly converts a name to an animator parameter.
name | The name of the animator parameter. |
AnimatorParameter | A new animator parameter with the given name. |
public static implicit operator int (AnimatorParameter property)
Implicitly converts an animator parameter to a hash id.
property | The animator parameter to convert to an id. |
int | The hash id of the animator parameter. |
public static implicit operator AnimatorParameter(string name)
Implicitly converts a name to an animator parameter.
name | The name of the animator parameter. |
AnimatorParameter | A new animator parameter with the given name. |
public static implicit operator int (AnimatorParameter property)
Implicitly converts an animator parameter to a hash id.
property | The animator parameter to convert to an id. |
int | The hash id of the animator parameter. |
None = 0
No constraint.
None = 0
No constraint.
X = 1
Constrain the X axis.
X = 1
Constrain the X axis.
Y = 2
Constrain the Y axis.
Y = 2
Constrain the Y axis.
Z = 4
Constrain the Z axis.
Z = 4
Constrain the Z axis.
[Flags]
-public enum AxisConstraint
Flags to constrain an axis.
None | No constraint. |
X | Constrain the X axis. |
Y | Constrain the Y axis. |
Z | Constrain the Z axis. |
[Flags]
+public enum AxisConstraint
Flags to constrain an axis.
None | No constraint. |
X | Constrain the X axis. |
Y | Constrain the Y axis. |
Z | Constrain the Z axis. |
public static bool Contains(this AxisConstraint constraints, AxisConstraint axis)
Checks if the constraints contains the specified axis.
constraints | The constraints to check. |
axis | The axis to check for. |
bool | True if the constraints contain the specified axis. |
public static bool Contains(this AxisConstraint constraints, AxisConstraint axis)
Checks if the constraints contains the specified axis.
constraints | The constraints to check. |
axis | The axis to check for. |
bool | True if the constraints contain the specified axis. |
public static class AxisConstraintExtensions
Extension methods for AxisConstraint.
Contains | Checks if the constraints contains the specified axis. |
public static class AxisConstraintExtensions
Extension methods for AxisConstraint.
Contains | Checks if the constraints contains the specified axis. |
public AxisConstraint constraints
Restricts rotation around the specified axes.
public AxisConstraint constraints
Restricts rotation around the specified axes.
public float damping
How quickly the transform rotates to look at the camera. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public float damping
How quickly the transform rotates to look at the camera. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public sealed class BillboardRotation : MonoBehaviour
Rotates the object so it is always facing the camera.
lookCamera | The camera to look at. The main camera will be used if not assigned. |
space | The coordinate space in which the object rotates. |
constraints | Restricts rotation around the specified axes. |
damping | How quickly the transform rotates to look at the camera. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount the transform can rotate per update. |
public sealed class BillboardRotation : MonoBehaviour
Rotates the object so it is always facing the camera.
lookCamera | The camera to look at. The main camera will be used if not assigned. |
space | The coordinate space in which the object rotates. |
constraints | Restricts rotation around the specified axes. |
damping | How quickly the transform rotates to look at the camera. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount the transform can rotate per update. |
public Camera lookCamera
The camera to look at. The main camera will be used if not assigned.
public Camera lookCamera
The camera to look at. The main camera will be used if not assigned.
public float maxSpeed
The maximum amount the transform can rotate per update.
public float maxSpeed
The maximum amount the transform can rotate per update.
public Space space
The coordinate space in which the object rotates.
public Space space
The coordinate space in which the object rotates.
public void BlinkOnce()
Blinks the material for one cycle.
public void BlinkOnce()
Blinks the material for one cycle.
public float blinkChance
The random chance that the object will blink.
public float blinkChance
The random chance that the object will blink.
public TimingRange blinkCooldown
The amount of seconds before the material can blink a subsequent time.
public TimingRange blinkCooldown
The amount of seconds before the material can blink a subsequent time.
public TimingRange blinkDuration
The amount of seconds the material stays blinking.
public TimingRange blinkDuration
The amount of seconds the material stays blinking.
public bool blinking { get; }
Whether the object is currently blinking (Read only).
public bool blinking { get; }
Whether the object is currently blinking (Read only).
public Material blinkingMaterial
The material applied to the object when blinking.
public Material blinkingMaterial
The material applied to the object when blinking.
public bool cooldown { get; }
Whether the blinking is currently on cooldown (Read only).
public bool cooldown { get; }
Whether the blinking is currently on cooldown (Read only).
public sealed class Blink : MonoBehaviour
Switches an object's material on and off at a variable rate.
renderer | A reference to the main blinking object's renderer (Read only). |
sharedRenderers | An array of other renderers whos material will be changed to match the blinking object. |
blinkingMaterial | The material applied to the object when blinking. |
notBlinkingMaterial | The material applied to the object when not blinking. |
blinkChance | The random chance that the object will blink. |
blinkDuration | The amount of seconds the material stays blinking. |
blinkCooldown | The amount of seconds before the material can blink a subsequent time. |
updateInterval | How frequently in seconds the script will execute as a way to optimize the code performance. |
nextUpdateTime | The time the next update will be performed (Read only). |
blinking | Whether the object is currently blinking (Read only). |
cooldown | Whether the blinking is currently on cooldown (Read only). |
BlinkOnce | Blinks the material for one cycle. |
public sealed class Blink : MonoBehaviour
Switches an object's material on and off at a variable rate.
renderer | A reference to the main blinking object's renderer (Read only). |
sharedRenderers | An array of other renderers whos material will be changed to match the blinking object. |
blinkingMaterial | The material applied to the object when blinking. |
notBlinkingMaterial | The material applied to the object when not blinking. |
blinkChance | The random chance that the object will blink. |
blinkDuration | The amount of seconds the material stays blinking. |
blinkCooldown | The amount of seconds before the material can blink a subsequent time. |
updateInterval | How frequently in seconds the script will execute as a way to optimize the code performance. |
nextUpdateTime | The time the next update will be performed (Read only). |
blinking | Whether the object is currently blinking (Read only). |
cooldown | Whether the blinking is currently on cooldown (Read only). |
BlinkOnce | Blinks the material for one cycle. |
public float nextUpdateTime { get; }
The time the next update will be performed (Read only).
public float nextUpdateTime { get; }
The time the next update will be performed (Read only).
public Material notBlinkingMaterial
The material applied to the object when not blinking.
public Material notBlinkingMaterial
The material applied to the object when not blinking.
public Renderer renderer { get; }
A reference to the main blinking object's renderer (Read only).
public Renderer renderer { get; }
A reference to the main blinking object's renderer (Read only).
public Renderer[] sharedRenderers
An array of other renderers whos material will be changed to match the blinking object.
public Renderer[] sharedRenderers
An array of other renderers whos material will be changed to match the blinking object.
public float updateInterval
How frequently in seconds the script will execute as a way to optimize the code performance.
public float updateInterval
How frequently in seconds the script will execute as a way to optimize the code performance.
Circular = 2
After reaching the end of the path, the object will traverse back to the first node and continue with the next loop.
Circular = 2
After reaching the end of the path, the object will traverse back to the first node and continue with the next loop.
None = 0
Turns off looping.
None = 0
Turns off looping.
PingPong = 3
The object traverses along the path forwards then backwards then forwards then backwards, etc.
PingPong = 3
The object traverses along the path forwards then backwards then forwards then backwards, etc.
Restart = 1
Restarts the object from the beginning of the path after it reaches the end. The object will jump to the position of the first node.
Restart = 1
Restarts the object from the beginning of the path after it reaches the end. The object will jump to the position of the first node.
public enum LoopType
A type of looping behavior.
None | Turns off looping. |
Restart | Restarts the object from the beginning of the path after it reaches the end. The object will jump to the position of the first node. |
Circular | After reaching the end of the path, the object will traverse back to the first node and continue with the next loop. |
PingPong | The object traverses along the path forwards then backwards then forwards then backwards, etc. |
public enum LoopType
A type of looping behavior.
None | Turns off looping. |
Restart | Restarts the object from the beginning of the path after it reaches the end. The object will jump to the position of the first node. |
Circular | After reaching the end of the path, the object will traverse back to the first node and continue with the next loop. |
PingPong | The object traverses along the path forwards then backwards then forwards then backwards, etc. |
public void Restart()
Restarts the path at the first node.
public void Restart()
Restarts the path at the first node.
public int currentIndex { get; }
The index of the node that the object is currently moving to (Read only).
public int currentIndex { get; }
The index of the node that the object is currently moving to (Read only).
public float damping
How quickly the object moves between nodes. Small numbers make the object more responsive. Larger numbers make the object respond more slowly.
public float damping
How quickly the object moves between nodes. Small numbers make the object more responsive. Larger numbers make the object respond more slowly.
public sealed class FollowPath : MonoBehaviour
Moves an object along a predefined path.
path | The transform comprising of all the child nodes in the path. |
nodeFrom | The transform of the node that the object is currently moving from (Read only). |
nodeTo | The transform of the node that the object is currently moving to (Read only). |
currentIndex | The index of the node that the object is currently moving to (Read only). |
damping | How quickly the object moves between nodes. Small numbers make the object more responsive. Larger numbers make the object respond more slowly. |
maxSpeed | The maximum speed the object can move between nodes. |
minProximity | Once the object is less than this distance to the current node, then it will advance to the next one. |
space | The coordinate space the object moves in. |
looping | The looping behavior, if desired. |
reversed | Moves the object between nodes in reverse. |
Restart | Restarts the path at the first node. |
public sealed class FollowPath : MonoBehaviour
Moves an object along a predefined path.
path | The transform comprising of all the child nodes in the path. |
nodeFrom | The transform of the node that the object is currently moving from (Read only). |
nodeTo | The transform of the node that the object is currently moving to (Read only). |
currentIndex | The index of the node that the object is currently moving to (Read only). |
damping | How quickly the object moves between nodes. Small numbers make the object more responsive. Larger numbers make the object respond more slowly. |
maxSpeed | The maximum speed the object can move between nodes. |
minProximity | Once the object is less than this distance to the current node, then it will advance to the next one. |
space | The coordinate space the object moves in. |
looping | The looping behavior, if desired. |
reversed | Moves the object between nodes in reverse. |
Restart | Restarts the path at the first node. |
public FollowPath.LoopType looping
The looping behavior, if desired.
public FollowPath.LoopType looping
The looping behavior, if desired.
public float maxSpeed
The maximum speed the object can move between nodes.
public float maxSpeed
The maximum speed the object can move between nodes.
public float minProximity
Once the object is less than this distance to the current node, then it will advance to the next one.
public float minProximity
Once the object is less than this distance to the current node, then it will advance to the next one.
public Transform nodeFrom { get; }
The transform of the node that the object is currently moving from (Read only).
public Transform nodeFrom { get; }
The transform of the node that the object is currently moving from (Read only).
public Transform nodeTo { get; }
The transform of the node that the object is currently moving to (Read only).
public Transform nodeTo { get; }
The transform of the node that the object is currently moving to (Read only).
public Transform path
The transform comprising of all the child nodes in the path.
public Transform path
The transform comprising of all the child nodes in the path.
public bool reversed
Moves the object between nodes in reverse.
public bool reversed
Moves the object between nodes in reverse.
public Space space
The coordinate space the object moves in.
public Space space
The coordinate space the object moves in.
void AddKey(float time, T value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
void AddKey(float time, T value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
T Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
T | The value of the curve, at the point in time specified. |
T Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
T | The value of the curve, at the point in time specified. |
void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
public interface IAnimationCurve<T>
A type that can be represented with animation curves.
T | The type evaluated by the animation curve. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
public interface IAnimationCurve<T>
A type that can be represented with animation curves.
T | The type evaluated by the animation curve. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
public Vector3 axis
The axis the object rotates around.
public Vector3 axis
The axis the object rotates around.
public sealed class InputRotation : MonoBehaviour
Rotates the transform based on user input.
axis | The axis the object rotates around. |
speed | The speed at which the transform rotates. |
space | The coordinate space to rotate the transform in. |
public sealed class InputRotation : MonoBehaviour
Rotates the transform based on user input.
axis | The axis the object rotates around. |
speed | The speed at which the transform rotates. |
space | The coordinate space to rotate the transform in. |
public Space space
The coordinate space to rotate the transform in.
public Space space
The coordinate space to rotate the transform in.
public float speed
The speed at which the transform rotates.
public float speed
The speed at which the transform rotates.
public AxisConstraint constraints
The position axes to lock.
public AxisConstraint constraints
The position axes to lock.
public sealed class LockPosition : MonoBehaviour
Locks the position of the transform to a specified value.
space | The coordinate space the transform is updated in. |
constraints | The position axes to lock. |
useTransformPosition | Sets the locked position to the transform's position at startup. |
lockedPosition | The locked position of the transform. |
public sealed class LockPosition : MonoBehaviour
Locks the position of the transform to a specified value.
space | The coordinate space the transform is updated in. |
constraints | The position axes to lock. |
useTransformPosition | Sets the locked position to the transform's position at startup. |
lockedPosition | The locked position of the transform. |
public Vector3 lockedPosition
The locked position of the transform.
public Vector3 lockedPosition
The locked position of the transform.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
public bool useTransformPosition
Sets the locked position to the transform's position at startup.
public bool useTransformPosition
Sets the locked position to the transform's position at startup.
public AxisConstraint constraints
The rotation axes to lock.
public AxisConstraint constraints
The rotation axes to lock.
public sealed class LockRotation : MonoBehaviour
Locks the rotation of the transform to a specified value.
space | The coordinate space the transform is updated in. |
constraints | The rotation axes to lock. |
useTransformRotation | Sets the locked rotation to the transform's rotation at startup. |
lockedRotation | The locked rotation of the transform. |
public sealed class LockRotation : MonoBehaviour
Locks the rotation of the transform to a specified value.
space | The coordinate space the transform is updated in. |
constraints | The rotation axes to lock. |
useTransformRotation | Sets the locked rotation to the transform's rotation at startup. |
lockedRotation | The locked rotation of the transform. |
public Vector3 lockedRotation
The locked rotation of the transform.
public Vector3 lockedRotation
The locked rotation of the transform.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
public bool useTransformRotation
Sets the locked rotation to the transform's rotation at startup.
public bool useTransformRotation
Sets the locked rotation to the transform's rotation at startup.
public AxisConstraint constraints
The scale axes to lock.
public AxisConstraint constraints
The scale axes to lock.
public sealed class LockScale : MonoBehaviour
Locks the scale of the transform to a specified value.
constraints | The scale axes to lock. |
useTransformScale | Sets the locked scale to the transform's scale at startup. |
lockedScale | The locked scale of the transform. |
public sealed class LockScale : MonoBehaviour
Locks the scale of the transform to a specified value.
constraints | The scale axes to lock. |
useTransformScale | Sets the locked scale to the transform's scale at startup. |
lockedScale | The locked scale of the transform. |
public Vector3 lockedScale
The locked scale of the transform.
public Vector3 lockedScale
The locked scale of the transform.
public bool useTransformScale
Sets the locked scale to the transform's scale at startup.
public bool useTransformScale
Sets the locked scale to the transform's scale at startup.
public TransformConstraint constraints
The transform properties to lock.
public TransformConstraint constraints
The transform properties to lock.
public sealed class LockTransform : MonoBehaviour
Locks the transform properties to specified values.
space | The coordinate space the transform is updated in. |
constraints | The transform properties to lock. |
useTransformValues | Sets the locked values to the transform's values at startup. |
lockedPosition | The locked position of the transform. |
lockedRotation | The locked rotation of the transform. |
lockedScale | The locked scale of the transform. |
public sealed class LockTransform : MonoBehaviour
Locks the transform properties to specified values.
space | The coordinate space the transform is updated in. |
constraints | The transform properties to lock. |
useTransformValues | Sets the locked values to the transform's values at startup. |
lockedPosition | The locked position of the transform. |
lockedRotation | The locked rotation of the transform. |
lockedScale | The locked scale of the transform. |
public Vector3 lockedPosition
The locked position of the transform.
public Vector3 lockedPosition
The locked position of the transform.
public Vector3 lockedRotation
The locked rotation of the transform.
public Vector3 lockedRotation
The locked rotation of the transform.
public Vector3 lockedScale
The locked scale of the transform.
public Vector3 lockedScale
The locked scale of the transform.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
public bool useTransformValues
Sets the locked values to the transform's values at startup.
public bool useTransformValues
Sets the locked values to the transform's values at startup.
public sealed class LookAtMouse : MonoBehaviour
Rotates the transform to look at the mouse.
screenCamera | The camera used to convert positions from world space to screen space. |
space | The coordinate space the transform rotates in. |
public sealed class LookAtMouse : MonoBehaviour
Rotates the transform to look at the mouse.
screenCamera | The camera used to convert positions from world space to screen space. |
space | The coordinate space the transform rotates in. |
public Camera screenCamera
The camera used to convert positions from world space to screen space.
public Camera screenCamera
The camera used to convert positions from world space to screen space.
public Space space
The coordinate space the transform rotates in.
public Space space
The coordinate space the transform rotates in.
public AxisConstraint constraints
The position axes to match.
public AxisConstraint constraints
The position axes to match.
public sealed class MatchPosition : MonoBehaviour
Matches the position of the transform to another transform.
space | The coordinate space the transform is updated in. |
constraints | The position axes to match. |
matchedTransform | The target transform to match the position to. |
public sealed class MatchPosition : MonoBehaviour
Matches the position of the transform to another transform.
space | The coordinate space the transform is updated in. |
constraints | The position axes to match. |
matchedTransform | The target transform to match the position to. |
public Transform matchedTransform
The target transform to match the position to.
public Transform matchedTransform
The target transform to match the position to.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
public AxisConstraint constraints
The rotation axes to match.
public AxisConstraint constraints
The rotation axes to match.
public sealed class MatchRotation : MonoBehaviour
Matches the rotation of the transform to another transform.
space | The coordinate space the transform is updated in. |
constraints | The rotation axes to match. |
matchedTransform | The target transform to match the rotation to. |
public sealed class MatchRotation : MonoBehaviour
Matches the rotation of the transform to another transform.
space | The coordinate space the transform is updated in. |
constraints | The rotation axes to match. |
matchedTransform | The target transform to match the rotation to. |
public Transform matchedTransform
The target transform to match the rotation to.
public Transform matchedTransform
The target transform to match the rotation to.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
public AxisConstraint constraints
The scale axes to match.
public AxisConstraint constraints
The scale axes to match.
public sealed class MatchScale : MonoBehaviour
Matches the scale of the transform to another transform.
constraints | The scale axes to match. |
matchedTransform | The target transform to match the scale to. |
public sealed class MatchScale : MonoBehaviour
Matches the scale of the transform to another transform.
constraints | The scale axes to match. |
matchedTransform | The target transform to match the scale to. |
public Transform matchedTransform
The target transform to match the scale to.
public Transform matchedTransform
The target transform to match the scale to.
public TransformConstraint constraints
The transform properties to match.
public TransformConstraint constraints
The transform properties to match.
public sealed class MatchTransform : MonoBehaviour
Matches the transform values to another transform.
space | The coordinate space the transform is updated in. |
constraints | The transform properties to match. |
matchedTransform | The target transform to match. |
public sealed class MatchTransform : MonoBehaviour
Matches the transform values to another transform.
space | The coordinate space the transform is updated in. |
constraints | The transform properties to match. |
matchedTransform | The target transform to match. |
public Transform matchedTransform
The target transform to match.
public Transform matchedTransform
The target transform to match.
public Space space
The coordinate space the transform is updated in.
public Space space
The coordinate space the transform is updated in.
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public sealed class Move : UpdateBehaviour
Moves an object in space by a given speed.
space | The coordinate space in which the object moves. |
speed | The speed at which the object moves. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public sealed class Move : UpdateBehaviour
Moves an object in space by a given speed.
space | The coordinate space in which the object moves. |
speed | The speed at which the object moves. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public Space space
The coordinate space in which the object moves.
public Space space
The coordinate space in which the object moves.
public Vector3 speed
The speed at which the object moves.
public Vector3 speed
The speed at which the object moves.
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public float angle { get; set; }
The current angle of the orbiting object in degrees.
public float angle { get; set; }
The current angle of the orbiting object in degrees.
public Transform center
The transform the object orbits around. If not assigned, the transform orbits around the origin of the specified coordinate space.
public Transform center
The transform the object orbits around. If not assigned, the transform orbits around the origin of the specified coordinate space.
public sealed class Orbit : UpdateBehaviour
Orbits an object around another object with a given speed and radius.
space | The coordinate space in which the object rotates. |
center | The transform the object orbits around. If not assigned, the transform orbits around the origin of the specified coordinate space. |
speed | The speed at which the object orbits. |
radius | The distance from the center of the object being orbited. |
startAngle | The initial angle in degrees of the orbiting object. |
angle | The current angle of the orbiting object in degrees. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public sealed class Orbit : UpdateBehaviour
Orbits an object around another object with a given speed and radius.
space | The coordinate space in which the object rotates. |
center | The transform the object orbits around. If not assigned, the transform orbits around the origin of the specified coordinate space. |
speed | The speed at which the object orbits. |
radius | The distance from the center of the object being orbited. |
startAngle | The initial angle in degrees of the orbiting object. |
angle | The current angle of the orbiting object in degrees. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public float radius
The distance from the center of the object being orbited.
public float radius
The distance from the center of the object being orbited.
public Space space
The coordinate space in which the object rotates.
public Space space
The coordinate space in which the object rotates.
public float speed
The speed at which the object orbits.
public float speed
The speed at which the object orbits.
public float startAngle
The initial angle in degrees of the orbiting object.
public float startAngle
The initial angle in degrees of the orbiting object.
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public Vector3 axis
The axis in which the object rotates.
public Vector3 axis
The axis in which the object rotates.
public sealed class Rotate : UpdateBehaviour
Rotates an object in space by a given speed.
space | The coordinate space in which the object rotates. |
axis | The axis in which the object rotates. |
speed | The speed at which the object rotates. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public sealed class Rotate : UpdateBehaviour
Rotates an object in space by a given speed.
space | The coordinate space in which the object rotates. |
axis | The axis in which the object rotates. |
speed | The speed at which the object rotates. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public Space space
The coordinate space in which the object rotates.
public Space space
The coordinate space in which the object rotates.
public float speed
The speed at which the object rotates.
public float speed
The speed at which the object rotates.
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public Vector3 axis
The axis in which the object rotates.
public Vector3 axis
The axis in which the object rotates.
public sealed class RotateAround : UpdateBehaviour
Rotates an object around a point by a given speed.
point | The point to rotate around. |
axis | The axis in which the object rotates. |
speed | The speed at which the object rotates. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public sealed class RotateAround : UpdateBehaviour
Rotates an object around a point by a given speed.
point | The point to rotate around. |
axis | The axis in which the object rotates. |
speed | The speed at which the object rotates. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public Transform point
The point to rotate around.
public Transform point
The point to rotate around.
public float speed
The speed at which the object rotates.
public float speed
The speed at which the object rotates.
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected override void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public sealed class Scale : UpdateBehaviour
Scales an object over time by a given speed.
speed | The speed at which the object's scale changes. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public sealed class Scale : UpdateBehaviour
Scales an object over time by a given speed.
speed | The speed at which the object's scale changes. |
OnUpdate | Handles updates of the animation behavior. |
updateMode | The update mode of the behavior. |
public Vector3 speed
The speed at which the object's scale changes.
public Vector3 speed
The speed at which the object's scale changes.
public abstract T Update(T target)
Smoothes the current value to the target value.
target | The target value. |
T | The new current value. |
public abstract T Update(T target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
T | The new current value. |
public abstract T Update(T target)
Smoothes the current value to the target value.
target | The target value. |
T | The new current value. |
public abstract T Update(T target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
T | The new current value. |
[Serializable]
-public abstract class SmoothDamp<T>
Gradually changes a value over time using a spring-damper function, which will never overshoot.
T | The type of value to be animated. |
value | The current value (Read only). |
velocity | The current velocity, this value is modified by the function every time you call it (Read only). |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
Update | Smoothes the current value to the target value. |
[Serializable]
+public abstract class SmoothDamp<T>
Gradually changes a value over time using a spring-damper function, which will never overshoot.
T | The type of value to be animated. |
value | The current value (Read only). |
velocity | The current velocity, this value is modified by the function every time you call it (Read only). |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
Update | Smoothes the current value to the target value. |
public float maxSpeed
Optionally allows you to clamp the maximum speed.
public float maxSpeed
Optionally allows you to clamp the maximum speed.
public float smoothTime
Approximately the time it will take to reach the target. A smaller value will reach the target faster.
public float smoothTime
Approximately the time it will take to reach the target. A smaller value will reach the target faster.
public T value { get; protected set; }
The current value (Read only).
public T value { get; protected set; }
The current value (Read only).
public T velocity { get; protected set; }
The current velocity, this value is modified by the function every time you call it (Read only).
public T velocity { get; protected set; }
The current velocity, this value is modified by the function every time you call it (Read only).
public override float Update(float target)
Smoothes the current value to the target value.
target | The target value. |
float | The new current value. |
public override float Update(float target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
float | The new current value. |
public override float Update(float target)
Smoothes the current value to the target value.
target | The target value. |
float | The new current value. |
public override float Update(float target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
float | The new current value. |
[Serializable]
-public class SmoothDampFloat : SmoothDamp<float>
Gradually changes a float over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
[Serializable]
+public class SmoothDampFloat : SmoothDamp<float>
Gradually changes a float over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
public override Quaternion Update(Quaternion target)
Smoothes the current value to the target value.
target | The target value. |
Quaternion | The new current value. |
public override Quaternion Update(Quaternion target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Quaternion | The new current value. |
public override Quaternion Update(Quaternion target)
Smoothes the current value to the target value.
target | The target value. |
Quaternion | The new current value. |
public override Quaternion Update(Quaternion target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Quaternion | The new current value. |
[Serializable]
-public class SmoothDampQuaternion : SmoothDamp<Quaternion>
Gradually changes a Quaternion over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
[Serializable]
+public class SmoothDampQuaternion : SmoothDamp<Quaternion>
Gradually changes a Quaternion over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
public override Vector2 Update(Vector2 target)
Smoothes the current value to the target value.
target | The target value. |
Vector2 | The new current value. |
public override Vector2 Update(Vector2 target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Vector2 | The new current value. |
public override Vector2 Update(Vector2 target)
Smoothes the current value to the target value.
target | The target value. |
Vector2 | The new current value. |
public override Vector2 Update(Vector2 target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Vector2 | The new current value. |
[Serializable]
-public class SmoothDampVector2 : SmoothDamp<Vector2>
Gradually changes a Vector2 over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
[Serializable]
+public class SmoothDampVector2 : SmoothDamp<Vector2>
Gradually changes a Vector2 over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
public override Vector3 Update(Vector3 target)
Smoothes the current value to the target value.
target | The target value. |
Vector3 | The new current value. |
public override Vector3 Update(Vector3 target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Vector3 | The new current value. |
public override Vector3 Update(Vector3 target)
Smoothes the current value to the target value.
target | The target value. |
Vector3 | The new current value. |
public override Vector3 Update(Vector3 target, float deltaTime)
Smoothes the current value to the target value with the given delta time.
target | The target value. |
deltaTime | The time since the last call to this function. |
Vector3 | The new current value. |
[Serializable]
-public class SmoothDampVector3 : SmoothDamp<Vector3>
Gradually changes a Vector3 over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
[Serializable]
+public class SmoothDampVector3 : SmoothDamp<Vector3>
Gradually changes a Vector3 over time using a spring-damper function, which will never overshoot.
Update | Smoothes the current value to the target value. |
smoothTime | Approximately the time it will take to reach the target. A smaller value will reach the target faster. |
maxSpeed | Optionally allows you to clamp the maximum speed. |
public AxisConstraint constraints
Prevents movement around the specified axes.
public AxisConstraint constraints
Prevents movement around the specified axes.
public float damping
How quickly the transform moves toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public float damping
How quickly the transform moves toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public sealed class SmoothFollow : MonoBehaviour
Moves toward the position of another transform using a smooth damping function.
target | The transform to follow. |
offset | The local offset position from the target's position that the camera moves toward. |
space | The coordinate space in which the object moves. |
constraints | Prevents movement around the specified axes. |
damping | How quickly the transform moves toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount of units the transform can move per tick. |
public sealed class SmoothFollow : MonoBehaviour
Moves toward the position of another transform using a smooth damping function.
target | The transform to follow. |
offset | The local offset position from the target's position that the camera moves toward. |
space | The coordinate space in which the object moves. |
constraints | Prevents movement around the specified axes. |
damping | How quickly the transform moves toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount of units the transform can move per tick. |
public float maxSpeed
The maximum amount of units the transform can move per tick.
public float maxSpeed
The maximum amount of units the transform can move per tick.
public Vector3 offset
The local offset position from the target's position that the camera moves toward.
public Vector3 offset
The local offset position from the target's position that the camera moves toward.
public Space space
The coordinate space in which the object moves.
public Space space
The coordinate space in which the object moves.
public Transform target
The transform to follow.
public Transform target
The transform to follow.
public AxisConstraint constraints
Prevents rotation around the specified axes.
public AxisConstraint constraints
Prevents rotation around the specified axes.
public float damping
How quickly the transform rotates toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public float damping
How quickly the transform rotates toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly.
public sealed class SmoothLookAt : MonoBehaviour
Rotates toward the position of another transform using a smooth damping function.
target | The transform to look at. |
offset | The local offset position from the target's position that the camera looks at. |
space | The coordinate space in which the object rotates. |
constraints | Prevents rotation around the specified axes. |
damping | How quickly the transform rotates toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount the transform can rotate per update. |
public sealed class SmoothLookAt : MonoBehaviour
Rotates toward the position of another transform using a smooth damping function.
target | The transform to look at. |
offset | The local offset position from the target's position that the camera looks at. |
space | The coordinate space in which the object rotates. |
constraints | Prevents rotation around the specified axes. |
damping | How quickly the transform rotates toward the target's position. Small numbers make the transform more responsive. Larger numbers make the transform respond more slowly. |
maxSpeed | The maximum amount the transform can rotate per update. |
public float maxSpeed
The maximum amount the transform can rotate per update.
public float maxSpeed
The maximum amount the transform can rotate per update.
public Vector3 offset
The local offset position from the target's position that the camera looks at.
public Vector3 offset
The local offset position from the target's position that the camera looks at.
public Space space
The coordinate space in which the object rotates.
public Space space
The coordinate space in which the object rotates.
public Transform target
The transform to look at.
public Transform target
The transform to look at.
public bool Includes(float time)
Checks if a time is within the start and end time.
time | The time to check. |
bool | True if the time is within the start and end time. |
public bool Includes(float time)
Checks if a time is within the start and end time.
time | The time to check. |
bool | True if the time is within the start and end time. |
public float Random()
Returns a random time within the start and end time.
float | A random time within the start and end time. |
public float Random()
Returns a random time within the start and end time.
float | A random time within the start and end time. |
public Timing(float start, float end)
Creates a new timing with the specified values.
start | The start time of the animation. |
end | The end time of the animation. |
public Timing(float start, float end)
Creates a new timing with the specified values.
start | The start time of the animation. |
end | The end time of the animation. |
public float end { get; set; }
The end time of the animation.
public float end { get; set; }
The end time of the animation.
[Serializable]
-public struct Timing
The start and end time of an animation.
start | The start time of the animation. |
end | The end time of the animation. |
Timing | Creates a new timing with the specified values. |
Random | Returns a random time within the start and end time. |
Includes | Checks if a time is within the start and end time. |
[Serializable]
+public struct Timing
The start and end time of an animation.
start | The start time of the animation. |
end | The end time of the animation. |
Timing | Creates a new timing with the specified values. |
Random | Returns a random time within the start and end time. |
Includes | Checks if a time is within the start and end time. |
public float start { get; set; }
The start time of the animation.
public float start { get; set; }
The start time of the animation.
public bool Includes(float time)
Checks if a time is within the start and end time.
time | The time to check. |
bool | True if the time is within the start and end time. |
public bool Includes(float time)
Checks if a time is within the start and end time.
time | The time to check. |
bool | True if the time is within the start and end time. |
public float Random()
Returns a random time within the start and end time.
float | A random time within the start and end time. |
public float Random()
Returns a random time within the start and end time.
float | A random time within the start and end time. |
public Timing01(float start, float end)
Creates a new timing with the specified values.
start | The start time of the animation, between 0 and 1. |
end | The end time of the animation, between 0 and 1. |
public Timing01(float start, float end)
Creates a new timing with the specified values.
start | The start time of the animation, between 0 and 1. |
end | The end time of the animation, between 0 and 1. |
public float end { get; set; }
The end time of the animation, between 0 and 1.
public float end { get; set; }
The end time of the animation, between 0 and 1.
[Serializable]
-public struct Timing01
The start and end time of an animation normalized between 0 and 1.
start | The start time of the animation, between 0 and 1. |
end | The end time of the animation, between 0 and 1. |
Timing01 | Creates a new timing with the specified values. |
Random | Returns a random time within the start and end time. |
Includes | Checks if a time is within the start and end time. |
[Serializable]
+public struct Timing01
The start and end time of an animation normalized between 0 and 1.
start | The start time of the animation, between 0 and 1. |
end | The end time of the animation, between 0 and 1. |
Timing01 | Creates a new timing with the specified values. |
Random | Returns a random time within the start and end time. |
Includes | Checks if a time is within the start and end time. |
public float start { get; set; }
The start time of the animation, between 0 and 1.
public float start { get; set; }
The start time of the animation, between 0 and 1.
public bool Includes(float time)
Checks if a time is within the min and max time.
time | The time to check. |
bool | True if the time is within the min and max time. |
public bool Includes(float time)
Checks if a time is within the min and max time.
time | The time to check. |
bool | True if the time is within the min and max time. |
public float Random()
Returns a random time within the min and max time.
float | A random time within the min and max time. |
public float Random()
Returns a random time within the min and max time.
float | A random time within the min and max time. |
public TimingRange(float min, float max)
Creates a new timing range with the specified values.
min | The lower bound of the timing range. |
max | The upper bound of the timing range. |
public TimingRange(float min, float max)
Creates a new timing range with the specified values.
min | The lower bound of the timing range. |
max | The upper bound of the timing range. |
[Serializable]
-public struct TimingRange
An animation timing range between a lower and upper bound.
min | The lower bound of the timing range. |
max | The upper bound of the timing range. |
TimingRange | Creates a new timing range with the specified values. |
Random | Returns a random time within the min and max time. |
Includes | Checks if a time is within the min and max time. |
[Serializable]
+public struct TimingRange
An animation timing range between a lower and upper bound.
min | The lower bound of the timing range. |
max | The upper bound of the timing range. |
TimingRange | Creates a new timing range with the specified values. |
Random | Returns a random time within the min and max time. |
Includes | Checks if a time is within the min and max time. |
public float max { get; set; }
The upper bound of the timing range.
public float max { get; set; }
The upper bound of the timing range.
public float min { get; set; }
The lower bound of the timing range.
public float min { get; set; }
The lower bound of the timing range.
public bool Includes(float time)
Checks if a time is within the min and max time.
time | The time to check. |
bool | True if the time is within the min and max time. |
public bool Includes(float time)
Checks if a time is within the min and max time.
time | The time to check. |
bool | True if the time is within the min and max time. |
public float Random()
Returns a random time within the min and max time.
float |
public float Random()
Returns a random time within the min and max time.
float |
public TimingRange01(float min, float max)
Creates a new timing range with the specified values.
min | The lower bound of the timing range, between 0 and 1. |
max | The upper bound of the timing range, between 0 and 1. |
public TimingRange01(float min, float max)
Creates a new timing range with the specified values.
min | The lower bound of the timing range, between 0 and 1. |
max | The upper bound of the timing range, between 0 and 1. |
[Serializable]
-public struct TimingRange01
An animation timing range normalized between 0 and 1.
min | The lower bound of the timing range, between 0 and 1. |
max | The upper bound of the timing range, between 0 and 1. |
TimingRange01 | Creates a new timing range with the specified values. |
Random | Returns a random time within the min and max time. |
Includes | Checks if a time is within the min and max time. |
[Serializable]
+public struct TimingRange01
An animation timing range normalized between 0 and 1.
min | The lower bound of the timing range, between 0 and 1. |
max | The upper bound of the timing range, between 0 and 1. |
TimingRange01 | Creates a new timing range with the specified values. |
Random | Returns a random time within the min and max time. |
Includes | Checks if a time is within the min and max time. |
public float max { get; set; }
The upper bound of the timing range, between 0 and 1.
public float max { get; set; }
The upper bound of the timing range, between 0 and 1.
public float min { get; set; }
The lower bound of the timing range, between 0 and 1.
public float min { get; set; }
The lower bound of the timing range, between 0 and 1.
None = 0
No constraint.
None = 0
No constraint.
Position = 1
Constrain the position of a transform.
Position = 1
Constrain the position of a transform.
Rotation = 2
Constrain the rotation of a transform.
Rotation = 2
Constrain the rotation of a transform.
Scale = 4
Constrain the scale of a transform.
Scale = 4
Constrain the scale of a transform.
[Flags]
-public enum TransformConstraint
Flags to constrain the properties of a transform.
None | No constraint. |
Position | Constrain the position of a transform. |
Rotation | Constrain the rotation of a transform. |
Scale | Constrain the scale of a transform. |
[Flags]
+public enum TransformConstraint
Flags to constrain the properties of a transform.
None | No constraint. |
Position | Constrain the position of a transform. |
Rotation | Constrain the rotation of a transform. |
Scale | Constrain the scale of a transform. |
public static bool Contains(this TransformConstraint constraints, TransformConstraint flag)
Checks if the constraints contains the specified flag.
constraints | The constraints to check. |
flag | The flag to check for. |
bool | True if the constraints contain the specified flag. |
public static bool Contains(this TransformConstraint constraints, TransformConstraint flag)
Checks if the constraints contains the specified flag.
constraints | The constraints to check. |
flag | The flag to check for. |
bool | True if the constraints contain the specified flag. |
public static class TransformConstraintExtensions
Extension methods for TransformConstraint.
Contains | Checks if the constraints contains the specified flag. |
public static class TransformConstraintExtensions
Extension methods for TransformConstraint.
Contains | Checks if the constraints contains the specified flag. |
protected virtual void OnDisable()
A Unity lifecycle method called when the behavior is disabled.
protected virtual void OnDisable()
A Unity lifecycle method called when the behavior is disabled.
protected virtual void OnEnable()
A Unity lifecycle method called when the behavior is enabled.
protected virtual void OnEnable()
A Unity lifecycle method called when the behavior is enabled.
protected abstract void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
protected abstract void OnUpdate(float deltaTime)
Handles updates of the animation behavior.
deltaTime | The time since the last frame. |
public abstract class UpdateBehaviour : MonoBehaviour
An animation behavior that can run in any update mode.
updateMode | The update mode of the behavior. |
OnUpdate | Handles updates of the animation behavior. |
OnEnable | A Unity lifecycle method called when the behavior is enabled. |
OnDisable | A Unity lifecycle method called when the behavior is disabled. |
public abstract class UpdateBehaviour : MonoBehaviour
An animation behavior that can run in any update mode.
updateMode | The update mode of the behavior. |
OnUpdate | Handles updates of the animation behavior. |
OnEnable | A Unity lifecycle method called when the behavior is enabled. |
OnDisable | A Unity lifecycle method called when the behavior is disabled. |
public UpdateMode updateMode
The update mode of the behavior.
public UpdateMode updateMode
The update mode of the behavior.
FixedUpdate = 2
Updates during the physics loop at a fixed timestep.
FixedUpdate = 2
Updates during the physics loop at a fixed timestep.
LateUpdate = 1
Updates after all other update functions, once every frame.
LateUpdate = 1
Updates after all other update functions, once every frame.
Update = 0
Updates during the normal loop, once every frame.
Update = 0
Updates during the normal loop, once every frame.
public enum UpdateMode
An update mode an animation behavior can run with.
Update | Updates during the normal loop, once every frame. |
LateUpdate | Updates after all other update functions, once every frame. |
FixedUpdate | Updates during the physics loop at a fixed timestep. |
public enum UpdateMode
An update mode an animation behavior can run with.
Update | Updates during the normal loop, once every frame. |
LateUpdate | Updates after all other update functions, once every frame. |
FixedUpdate | Updates during the physics loop at a fixed timestep. |
public void AddKey(float time, Vector2 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public void AddKey(float time, Vector2 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public Vector2 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector2 | The value of the curve, at the point in time specified. |
public Vector2 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector2 | The value of the curve, at the point in time specified. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
[Serializable]
-public sealed class Vector2AnimationCurve : IAnimationCurve<Vector2>
Stores a collection of keyframes that can be evaluated over time as a Vector2.
x | The collection of keyframes for the x-axis of a Vector2. |
y | The collection of keyframes for the y-axis of a Vector2. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
[Serializable]
+public sealed class Vector2AnimationCurve : IAnimationCurve<Vector2>
Stores a collection of keyframes that can be evaluated over time as a Vector2.
x | The collection of keyframes for the x-axis of a Vector2. |
y | The collection of keyframes for the y-axis of a Vector2. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector2.
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector2.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector2.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector2.
public void AddKey(float time, Vector3 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public void AddKey(float time, Vector3 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public Vector3 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector3 | The value of the curve, at the point in time specified. |
public Vector3 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector3 | The value of the curve, at the point in time specified. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
[Serializable]
-public sealed class Vector3AnimationCurve : IAnimationCurve<Vector3>
Stores a collection of keyframes that can be evaluated over time as a Vector3.
x | The collection of keyframes for the x-axis of a Vector3. |
y | The collection of keyframes for the y-axis of a Vector3. |
z | The collection of keyframes for the z-axis of a Vector3. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
[Serializable]
+public sealed class Vector3AnimationCurve : IAnimationCurve<Vector3>
Stores a collection of keyframes that can be evaluated over time as a Vector3.
x | The collection of keyframes for the x-axis of a Vector3. |
y | The collection of keyframes for the y-axis of a Vector3. |
z | The collection of keyframes for the z-axis of a Vector3. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector3.
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector3.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector3.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector3.
public AnimationCurve z
The collection of keyframes for the z-axis of a Vector3.
public AnimationCurve z
The collection of keyframes for the z-axis of a Vector3.
public void AddKey(float time, Vector4 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public void AddKey(float time, Vector4 value)
Adds a new key to the curve.
time | The time at which to add the key (horizontal axis in the curve graph). |
value | The value for the key (vertical axis in the curve graph). |
public Vector4 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector4 | The value of the curve, at the point in time specified. |
public Vector4 Evaluate(float time)
Evaluate the curve at the specified time.
time | The time within the curve you want to evaluate (the horizontal axis in the curve graph). |
Vector4 | The value of the curve, at the point in time specified. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
public void RemoveKey(int index)
Removes a key.
index | The index of the key to remove. |
[Serializable]
-public sealed class Vector4AnimationCurve : IAnimationCurve<Vector4>
Stores a collection of keyframes that can be evaluated over time as a Vector4.
x | The collection of keyframes for the x-axis of a Vector4. |
y | The collection of keyframes for the y-axis of a Vector4. |
z | The collection of keyframes for the z-axis of a Vector4. |
w | The collection of keyframes for the w-axis of a Vector4. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
[Serializable]
+public sealed class Vector4AnimationCurve : IAnimationCurve<Vector4>
Stores a collection of keyframes that can be evaluated over time as a Vector4.
x | The collection of keyframes for the x-axis of a Vector4. |
y | The collection of keyframes for the y-axis of a Vector4. |
z | The collection of keyframes for the z-axis of a Vector4. |
w | The collection of keyframes for the w-axis of a Vector4. |
Evaluate | Evaluate the curve at the specified time. |
AddKey | Adds a new key to the curve. |
RemoveKey | Removes a key. |
public AnimationCurve w
The collection of keyframes for the w-axis of a Vector4.
public AnimationCurve w
The collection of keyframes for the w-axis of a Vector4.
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector4.
public AnimationCurve x
The collection of keyframes for the x-axis of a Vector4.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector4.
public AnimationCurve y
The collection of keyframes for the y-axis of a Vector4.
public AnimationCurve z
The collection of keyframes for the z-axis of a Vector4.
public AnimationCurve z
The collection of keyframes for the z-axis of a Vector4.
Animates the tiling property of a renderer's material.
Animates a series of sprites over time.
Extension methods for AxisConstraint.
Rotates the object so it is always facing the camera.
Switches an object's material on and off at a variable rate.
Moves an object along a predefined path.
Rotates the transform based on user input.
Locks the position of the transform to a specified value.
Locks the rotation of the transform to a specified value.
Locks the scale of the transform to a specified value.
Locks the transform properties to specified values.
Rotates the transform to look at the mouse.
Matches the position of the transform to another transform.
Matches the rotation of the transform to another transform.
Matches the scale of the transform to another transform.
Matches the transform values to another transform.
Moves an object in space by a given speed.
Orbits an object around another object with a given speed and radius.
Rotates an object in space by a given speed.
Rotates an object around a point by a given speed.
Scales an object over time by a given speed.
Gradually changes a value over time using a spring-damper function, which will never overshoot.
Gradually changes a float over time using a spring-damper function, which will never overshoot.
Gradually changes a Quaternion over time using a spring-damper function, which will never overshoot.
Gradually changes a Vector2 over time using a spring-damper function, which will never overshoot.
Gradually changes a Vector3 over time using a spring-damper function, which will never overshoot.
Moves toward the position of another transform using a smooth damping function.
Rotates toward the position of another transform using a smooth damping function.
Extension methods for TransformConstraint.
An animation behavior that can run in any update mode.
Stores a collection of keyframes that can be evaluated over time as a Vector2.
Stores a collection of keyframes that can be evaluated over time as a Vector3.
Stores a collection of keyframes that can be evaluated over time as a Vector4.
An animation parameter that can be set on an Animator. A hash id is automatically created for the parameter. Ids are used for optimized setters and getters on Animator parameters.
The start and end time of an animation.
The start and end time of an animation normalized between 0 and 1.
An animation timing range between a lower and upper bound.
An animation timing range normalized between 0 and 1.
A type that can be represented with animation curves.
Flags to constrain an axis.
A type of looping behavior.
Flags to constrain the properties of a transform.
An update mode an animation behavior can run with.
Animates the tiling property of a renderer's material.
Animates a series of sprites over time.
Extension methods for AxisConstraint.
Rotates the object so it is always facing the camera.
Switches an object's material on and off at a variable rate.
Moves an object along a predefined path.
Rotates the transform based on user input.
Locks the position of the transform to a specified value.
Locks the rotation of the transform to a specified value.
Locks the scale of the transform to a specified value.
Locks the transform properties to specified values.
Rotates the transform to look at the mouse.
Matches the position of the transform to another transform.
Matches the rotation of the transform to another transform.
Matches the scale of the transform to another transform.
Matches the transform values to another transform.
Moves an object in space by a given speed.
Orbits an object around another object with a given speed and radius.
Rotates an object in space by a given speed.
Rotates an object around a point by a given speed.
Scales an object over time by a given speed.
Gradually changes a value over time using a spring-damper function, which will never overshoot.
Gradually changes a float over time using a spring-damper function, which will never overshoot.
Gradually changes a Quaternion over time using a spring-damper function, which will never overshoot.
Gradually changes a Vector2 over time using a spring-damper function, which will never overshoot.
Gradually changes a Vector3 over time using a spring-damper function, which will never overshoot.
Moves toward the position of another transform using a smooth damping function.
Rotates toward the position of another transform using a smooth damping function.
Extension methods for TransformConstraint.
An animation behavior that can run in any update mode.
Stores a collection of keyframes that can be evaluated over time as a Vector2.
Stores a collection of keyframes that can be evaluated over time as a Vector3.
Stores a collection of keyframes that can be evaluated over time as a Vector4.
An animation parameter that can be set on an Animator. A hash id is automatically created for the parameter. Ids are used for optimized setters and getters on Animator parameters.
The start and end time of an animation.
The start and end time of an animation normalized between 0 and 1.
An animation timing range between a lower and upper bound.
An animation timing range normalized between 0 and 1.
A type that can be represented with animation curves.
Flags to constrain an axis.
A type of looping behavior.
Flags to constrain the properties of a transform.
An update mode an animation behavior can run with.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
@@ -174,4 +174,4 @@Use the Unity Package Manager to install the Animation Library package.
Window > Package Manager
The source code for the Animation Library package is in the following repository:
MIT License
+MIT License
Copyright (c) 2022 Zigurous
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -14,4 +14,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.
When setting animator parameters in code, it is more efficient to use hash ids instead of strings. The Animation Library package includes the struct AnimatorParameter that automatically creates a hash id for a given parameter name. Use AnimatorParameter
anywhere you might declare a variable for a custom parameter instead of a string. It will still be serialized as a string in the editor, but you can use the id when getting or setting an animator parameter.
public AnimatorParameter parameter = "Time";
@@ -7,4 +7,4 @@
// implicitly converts the parameter to a hash id
animator.SetFloat(parameter, time);
}
-
Masking allows you to discard some of the animation data within a clip, allowing the clip to animate only parts of a character rather than the entire thing. For example, you may have a standard walking animation that includes both arm and leg motion, but if a character is carrying a large object with both hands then you wouldn’t want their arms to swing to the side as they walk.
Mask assets can be used in Animator Controllers, when specifying Animation Layers to apply masking at runtime, or in the import settings of your animation files to apply masking during the import animation. A benefit of using masks is that they tend to reduce memory overheads since body parts that are not active do not need their associated animation curves.
@@ -23,4 +23,4 @@The Animation Library package includes several MonoBehaviours for animating objects in different ways. Add any of the following to a game object in your scene to get started:
Moves toward the position of another transform using a smooth damping function.
Rotates toward the position of another transform using a smooth damping function.
Rotates toward the position of another transform using a smooth damping function.
The Animation Library package includes several data structures to assist in animation-related purposes, mainly when writing custom scripts.
Stores a collection of keyframes that can be evaluated over time as a Vector4.
Stores a collection of keyframes that can be evaluated over time as a Vector4.
The Animation Library package contains assets and scripts for animating Unity objects. Animation behaviors include Blink, FollowPath, Move, Orbit, Rotate, Scale, SmoothFollow, SmoothLookAt, and more. The package also contains several animation-related data structures and predefined avatar masks.