Im working on a custom editor, and the problem is, a simple Event.MouseDown and Event.MouseUp isn't working correctly at all.
Code:
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
[CustomEditor(typeof(Thing)), Serializable, InitializeOnLoad]
public class ThingEditor : Editor {
void OnSceneGUI(){
Event current = Event.current;
Ray ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition);
if(current.type == EventType.MouseDown) {
Debug.Log ("HI");
}
if (current.type == EventType.MouseUp) {
Debug.Log ("BYE");
}
}
}
Its not even saying BYE when I want it to.
↧