I’m trying to use Event.CommandName in an EditorWindow.
When I add this code to OnGUI() I get a continuous stream of "in == NULL’’ errors in the log.
The code is straight from the documentation:
Event e = Event.current;
if (e.commandName != "")
Debug.Log("Command: " + e.commandName);
What am I doing wrong? Or is it broken?
Using Unity 3 Pro.
[EDIT] Just to check, I made a new project with nothing else going on and it still happens.
Here’s the full error:
in == NULL
UnityEngine.Event:get_commandName()
CommandTest:OnGUI() (at Assets/Editor/CommandTest.cs:67)
UnityEditor.DockArea:OnGUI()