- Home /
Question by
AnelorGui · Mar 25, 2020 at 03:16 PM ·
gameobjectscenefindmanagerfindwithtag
Access gameObject between multi-scene
Hi,
Is it possible to find a gameObject in the Main scene if the script that is searching the gameObject is in DontDistroyOnLoad gameObject ?
See below : My script wants to access the gameObject "ScenarioCalibration" is in GlobalSceneManager.
When I try that, it works :
obj1 = GameObject.Find("Globals");
Debug.Log("GameObject: " + obj1.name);
But that doesn't work (I precise that my gameObject "ScenarioCalibration" is tagged as "Instruction" !
obj1 = GameObject.FindWithTag("Instruction");
Debug.Log("GameObject: " + obj1.name);
Thanks !!!
annotation.png
(15.7 kB)
Comment