Hi,
I think this goes into editor scripting but how I can make a 3D matrix out of a prefab of mine while I’m in the editor? Is there anyway to write code that I only need once? Something like interpreting that we have with Lua/Python.
Thanks
Hi,
I think this goes into editor scripting but how I can make a 3D matrix out of a prefab of mine while I’m in the editor? Is there anyway to write code that I only need once? Something like interpreting that we have with Lua/Python.
Thanks
line before void start() or your function use [ExecuteInEditMode]
You can use this as a template:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class MyStuff : EditorWindow
{
/*
[MenuItem (“MyStuff/function1”)]
public static void CreateTheStones ()
{
//your first function…
}
[MenuItem (“MyStuff/function2”)]
public static void CreateLODsForTaggedGeoObjects ()
{
// your second function
}
…
}
store this in a folder called “Editor” elsewhere you get an error when compiling.
Now you have a new menu with some buttons and you can use your functions as much as you like…