Findいろいろ

  • Find
GameObject obj=GameObject.Find("MapRoot");

  • FindWithTag
GameObject obj=GameObject.FindWithTag("Enemy");

  • 複数のObject削除
GameObject[] obj=GameObject.FindGameObjectsWithTag("Pole");
foreach(GameObject obs in obj) Destroy(obs);

タグ:

sample
最終更新:2015年06月21日 10:08