Unity - Scripting API: AnimationMode.IsPropertyAnimated
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Declaration
public static bool IsPropertyAnimated(Object target, string propertyPath);
Parameters
| Parameter | Description |
|---|---|
| target | The object to determine if it contained the animation. |
| propertyPath | The name of the animation to search for. |
Returns
bool Whether the property search is found or not.
Description
Checks whether the specified property is in Animation mode and is being animated.
IsPropertyAnimated checks whether a property is being animated. This check requires also the object where the property can be found.
color is searched for in the following script example . It is part of the Renderer object.
Note that the example uses a sphere GameObject and an animation file, color.anim. The color
animation in color.anim has the color varying from yellow to blue.