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 :: object list to csv c# 
Csharp :: game object find 
Csharp :: void on collision enter 2d 
Csharp :: valid url in .net 
Csharp :: c# loading assembly at runtime 
Csharp :: elevated priviledge in c# 
Csharp :: c# how to exit program 
Csharp :: c# initialize array 
Csharp :: c# transparent label 
Csharp :: change array size in unity 
Csharp :: random unity 
Csharp :: c# datetimepicker set weeks before today 
Csharp :: c# get random double in range 
Csharp :: c# create instance from type 
Csharp :: how to check the distance between two dates c# 
Csharp :: list of chars to string c# 
Csharp :: c# connect to mongodb 
Csharp :: How can you learn C# on your own 
Csharp :: c# odd even median 
Csharp :: mvc list to jsonresult 
Csharp :: audio source pause unity 
Csharp :: unity smooth rotation 2d 
Csharp :: c# for loop increment by 2 
Csharp :: initialize ConsoleLoggerProvider in EF core 
Csharp :: c# groupby date 
Csharp :: c# string.join 
Csharp :: how to convert string to int in c# 
Csharp :: .net Core Get File Request 
Csharp :: print content of array c# 
Csharp :: clear controls from panel c# 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =