Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity detect if animation is playing

if(this.GetComponent<Animator>().GetCurrentAnimatorStateInfo(0).normalizedTime >= 1)
{
	//Do something when animator isn't playing
{
Comment

unity animator check if animation is playing

bool isPlaying(Animator anim, string stateName)
{
    if (anim.GetCurrentAnimatorStateInfo(animLayer).IsName(stateName) &&
            anim.GetCurrentAnimatorStateInfo(animLayer).normalizedTime < 1.0f)
        return true;
    else
        return false;
}
Comment

check if animation is playing unity

if (myAnimator.GetCurrentAnimatorStateInfo(0).IsTag("Example"))
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity nested list 
Csharp :: casting string to enum type 
Csharp :: read input c# 
Csharp :: c# afficher texte 
Csharp :: Attribute [livewire] does not exist. 
Csharp :: c# difference between two dates in milliseconds C# 
Csharp :: custom array initializer in c# 
Csharp :: shuffle arraylist c# 
Csharp :: how to change color of a sprite in unity 
Csharp :: How do i destroy a prefab without the error? 
Csharp :: c# mailmessage set sender name 
Csharp :: unity on inspector change 
Csharp :: c# get offset from timezone 
Csharp :: how to move a gameobject to another object 
Csharp :: unity assembly 
Csharp :: how to make a mouse down condition in unity 
Csharp :: increase timeout in .net core web app 
Csharp :: how to get hours and minutes from second in c# 
Csharp :: Open another form with C# Winforms 
Csharp :: dialog box with form flutter 
Csharp :: c# read file 
Csharp :: c# 2d list 
Csharp :: unity quaternion 
Csharp :: What is the difference between String and string in C#? 
Csharp :: change name of gameobject 
Csharp :: what does static mean in c# 
Csharp :: c# date format 
Csharp :: c# datagridview hide row selector 
Csharp :: remove adjacent duplicate characters 
Csharp :: CS0101 Unity Error Code 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =