Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


InAnimationMode

Checks whether the Editor is in Animation mode.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

InAnimationMode()

Checks whether the Editor is in Animation mode.
public static bool InAnimationMode()

Returns

Type

Description

bool

Remarks

AnimationMode.InAnimationMode returns a value of true or false, indicating whether the animation is being controlled by AnimationMode. If AnimationMode.InAnimationMode returns
true
then AnimationMode.SampleAnimationClip can be used to animate the attached object.
Note: The script example at AnimationMode shows how AnimationMode.InAnimationMode can be used.

InAnimationMode(AnimationModeDriver)

Checks whether the Editor is in Animation mode.
public static bool InAnimationMode(AnimationModeDriver driver)

Parameters

An AnimationModeDriver object that tests if AnimationMode has been locked specifically for this driver.

Returns

Type

Description

bool

Remarks

AnimationMode.InAnimationMode returns a value of true or false, indicating whether the animation is being controlled by AnimationMode. If AnimationMode.InAnimationMode returns
true
then AnimationMode.SampleAnimationClip can be used to animate the attached object.
Note: The script example at AnimationMode shows how AnimationMode.InAnimationMode can be used.