Created
April 18, 2020 12:14
-
-
Save openroomxyz/7fd13b223ef20b237b1bd46b89174bff to your computer and use it in GitHub Desktop.
Unity : How can i Instantiate Prefab by filename from File inside the folder Resources ?
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 instanciatedCube = (GameObject)PrefabUtility.InstantiatePrefab(Resources.Load("Cube")); | |
| //Prefab has to be in folder named Resources |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment