There are multiple ways!
GameObject.FindGameObjectWithTag();
GameObject.FindGameObjectOfType<>();
Resources.Load();
The third one you need to make a folder called "Resources".
Say you have a folder inside "Resources" called Prefabs. So to load this you would:
Resources.Load("Prefabs/myPrefab")
Hope this helps!!
P.S. Yes, I use to also use Drag + Drop. Im so glad I stopped =]
↧