Last active
May 4, 2020 12:04
-
-
Save openroomxyz/7b835efdbd23e48e58e42765b6f380e0 to your computer and use it in GitHub Desktop.
Unity : How to Instantiate a prefab from resource folder, by name? [Works in Build and Editor! ]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GameObject my_game_object = (GameObject)Resources.Load("BIP", typeof(GameObject)); | |
Instantiate(my_game_object); | |
Instantiate(my_game_object); //we can Instantiate the prefab many times and creates mane game object from it | |
my_game_object = null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment