Files

15 lines
216 B
JavaScript
Raw Permalink Normal View History

2025-05-13 05:18:03 +03:00
var timeOut = 1.0;
var detachChildren = false;
function Awake ()
{
Invoke ("DestroyNow", timeOut);
}
function DestroyNow ()
{
if (detachChildren) {
transform.DetachChildren ();
}
DestroyObject (gameObject);
}