Last active
June 12, 2019 20:48
-
-
Save pr00thmatic/b7cbcee604842596f44b8911e8d54806 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RaycastHit hitInfo; | |
Ray worldRay = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); | |
return Physics.Raycast(worldRay, out hitInfo); | |
if (Event.current.type == EventType.MouseDown) { | |
// el usuario hizo click en la escena! | |
GUIUtility.hotControl = GUIUtility.GetControlID(FocusType.Passive); | |
Event.current.Use(); | |
// las dos líneas de código anteriores cancelan el evento. | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment