Trying to create editor, that capable of drawing texture on my tiled mesh. I can do that in runtime, but completely can’t understand editmode. Using Javascript, expect to receive “working” in the console on mousedown in sceneview… How can I do that?
#pragma strict
//using UnityEditor;
//@script ExecuteInEditMode()
class HexMaker extends EditorWindow {
@MenuItem ("Window/HexMaker")
static function ShowWindow () {
EditorWindow.GetWindow (HexMaker);
}
function OnGUI () {
}
function OnSceneGUI () {
if (Event.current.type == EventType.MouseDown){
Debug.Log("working");
// Event.current.Use();
}
}
}