Destroy (GameObject obj, float time = 0.0f)
time 為延遲銷毀的時間
銷毀遊戲物件
|
Destroy(this); |
|
Destroy(gameObject, 5); //5秒銷毀 |
銷毀遊戲元件
|
Destroy(GetComponent<Rigidbody>()); |
文章標籤
全站熱搜
Destroy (GameObject obj, float time = 0.0f)
time 為延遲銷毀的時間
銷毀遊戲物件
|
Destroy(this); |
|
Destroy(gameObject, 5); //5秒銷毀 |
銷毀遊戲元件
|
Destroy(GetComponent<Rigidbody>()); |