![]() ![]() Note while instantiating the object, don't forget to SetActive true. And since the object are is disabled in hierarchy it is not working but holding all the property of its prefab, just like the prefab itself. What basically we are doing here is instead of using prefab we are using object as a reference for instantiating objects. But to answer your main question: no, any script you want to access must be present in the scene. ![]() If you need a reference from one to the other, you can GetComponent the other script.
0 Comments
Leave a Reply. |