“Unity mengaktifkan GameObject” Kode Jawaban

persatuan cara mengatur GameObjKect diaktifkan

//This is for unity
GameObject.SetActive(true);
Open Oryx

Unity mengaktifkan GameObject

GameObject.Find("PlayMenu 3").SetActive(false);
// you could also store a GameObject as  variable
Comfortable Caterpillar

Unity mengaktifkan GameObject


 // Drag & Drop the gameobject in the inspector
 public GameObject targetGameObject ;

 public void DisableGameObject()
 {
      targetGameObject.SetActive( false ) ;
 }

 public void EnableGameObject()
 {
      targetGameObject.SetActive( true ) ;
 }

 public void ToggleGameObject()
 {
      if( targetGameObject.activeSelf )
           DisableGameObject() ;
      else
           EnableGameObject();
 }

Sore Starling

Jawaban yang mirip dengan “Unity mengaktifkan GameObject”

Pertanyaan yang mirip dengan “Unity mengaktifkan GameObject”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya