The topic says it all…
Is it possible to create a C# script which adds a custom Prefab to the Editor menu? How would I do this?
Thanks 4 your thoughts!
The topic says it all…
Is it possible to create a C# script which adds a custom Prefab to the Editor menu? How would I do this?
Thanks 4 your thoughts!
You can add the custom menu item like this …
public static class WombatCreator
{
[MenuItem("GameObject/Create Other/Wombat")]
static void CreateWombat()
{
Debug.Log("wombat");
}
}
To instantiate a prefab, you could use AssetDatabase.LoadAssetAtPath to find the prefab, then EditorUtility.InstantiatePrefab to create a copy of it in the scene.