Hey, i’m new to unity and i have a question. I have this prefab in my project and i want to instantiate it but without have to drag n drop it on my script:
GameObject MyObject = new GameObject(“MyPrefabName”);
This way i will just create a empty GO (not the prefab in my project)
public GameObject MyObject;
Drag n Drop my prefab on the Inspector
GameObject MyInstance = (GameObject)Instantiate(MyObject);
This do it right but i want to type my prefab name(or something like this) instead of drag n drop it.
How can i do that?
Thanks. Sorry about my english.