disappear after time unity
Destroy(gameObject, 3); //it will disappear after 3 seconds
disappear after time unity
Destroy(gameObject, 3); //it will disappear after 3 seconds
destroy after animation unity
public class DestroyOnExit : StateMachineBehaviour { public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { Destroy(animator.gameObject, stateInfo.length); }}
//for more info: https://answers.unity.com/questions/670860/delete-object-after-animation-2d.html
how to destroy a gameobject after a sertain amount of seconds
Destroy(objReference, timerInSeconds);
unity destroy gameobject with delay
[SerializeField] GameObject MyGreatObject;
//Choose MyGreatObject in the inspector
Destroy (MyGreatObject, 5);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us