Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Event Mouse not working correctly

$
0
0
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.

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>