Skip to content

Instantly share code, notes, and snippets.

@openroomxyz
Created April 18, 2020 12:14
Show Gist options
  • Select an option

  • Save openroomxyz/7fd13b223ef20b237b1bd46b89174bff to your computer and use it in GitHub Desktop.

Select an option

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 ?
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