Advertisement
Guest User

Untitled

a guest
Jun 21st, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class ClearAnimations : MonoBehaviour
  5. {
  6.  
  7.     // Use this for initialization
  8.     void Start ()
  9.     {
  10.         StartCoroutine(WaitAndClearAnimations(1.0f));
  11.     }
  12.    
  13.     IEnumerator WaitAndClearAnimations(float waitTime)
  14.     {
  15.         yield return new WaitForSeconds(waitTime);
  16.         Destroy(gameObject);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement