Answers for "unity find all objects with name"

C#
0

unity find all objects with script

public void GetAllObjectsWithScript() {                
     ScriptName[] list = FindObjectsOfType(typeof(ScriptName)) as ScriptName[];
     foreach(ScriptName obj in list) {             
     	// Do whatever          
     }     
}
Posted by: Guest on November-09-2020
3

c# unity get name of object

public GameObject obj;

void Start()
{
	string objName = obj.name;
  	Debug.Log(objName);
}
Posted by: Guest on December-03-2021

Code answers related to "unity find all objects with name"

C# Answers by Framework

Browse Popular Code Answers by Language