it-notepad.com

Unity dynamically add prefab Script

Unity dynamically add prefab Script

To add prefab dynamically, do this:

GameObject variableForPrefab = (GameObject)Resources.Load("prefabs/prefab_of_game", typeof(GameObject));

 

Exit mobile version