Hi, I have troubles catching Event.current.commandName == “ObjectSelectorUpdated” after invoking ObjectPicker and selecting something in it.
First I invoke the ObjectPicker after recieving an event. myObject is just a null Brain.
void OnPullingFromBrain(object obj, System.EventArgs e)
{
EditorGUIUtility.ShowObjectPicker<Brain>(myObject, true, "", 1);
}
Then in OnGUI I’m checking
if (Event.current.commandName == "ObjectSelectorClosed")
{
Debug.Log(EditorGUIUtility.GetObjectPickerObject());
}
However command is always empty string. Even debuging it every OnGUI call I get just bunch of empty strings regardless of ObjectPicker updating, closing or whatever.
Any idea what could cause this?