Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

destroy the game object if the animator has finished its animation

// destroy the game object if the animator has finished its animation
		if (anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1)
        {
			Destroy(gameObject);
		}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #destroy #game #object #animator #finished #animation
ADD COMMENT
Topic
Name
6+6 =