Skip to content

Instantly share code, notes, and snippets.

@MrMatthias
Created August 27, 2015 18:39
Show Gist options
  • Save MrMatthias/6e79edefaa46a9649244 to your computer and use it in GitHub Desktop.
Save MrMatthias/6e79edefaa46a9649244 to your computer and use it in GitHub Desktop.
UnityEditor load and instantiate prefab
GameObject {prefabName} = AssetDatabase.LoadAssetAtPath<GameObject> ("Assets/{path}/{name}.prefab");
GameObject {name} = PrefabUtility.InstantiatePrefab ({prefabName}) as GameObject;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment