SFE_destroyThisTimed.js 272 B

123456789
  1. //this very basic script destroys its gameobject in a pre-set amount of time. I use it all the time
  2. //so effect holders and various stuffs do not remain in the scene.
  3. var destroyTime:float=5;
  4. function Start () {
  5. Destroy (gameObject, destroyTime);
  6. }
  7. function Update () {
  8. }