“Hancurkan objek Game” Kode Jawaban

bagaimana menghancurkan objek dalam persatuan

Destroy(gameObject);
Envious Emu

Hancurkan GameObject Unity

Destroy(this.gameObject);
A guy using his dad's PC

Hancurkan objek Game

//Box collider is triggered
// Use "Destroy ( other.gameObject );" to destroy other game object
private void OnTriggerEnter ( Collider other )
    {
   //    if(other.tag == "Plane" ){
        Destroy ( this.gameObject );
   // }
    }
//Box collider is not triggered
//  private void OnCollisionEnter ( Collision collision )
//    {
//        Destroy ( gameObject );
//    }
M.Bilal Nawaz

Jawaban yang mirip dengan “Hancurkan objek Game”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya