internal Rect Do(int controlID) { var eventType = Event.current.GetTypeForControl(controlID); if (eventType == EventType.MouseDown) { m_StartPosition = ModuleUtility.GUIToWorld(Event.current.mousePosition); m_Position = m_StartPosition; } if (eventType == EventType.Layout) { HandleUtility.AddDefaultControl(controlID); } m_Position = Slider2D.Do(controlID, m_Position); var rect = new Rect(); rect.min = m_StartPosition; rect.max = m_Position; return(rect); }
public Vector3 GUIToWorld(Vector2 guiPosition, Vector3 planeNormal, Vector3 planePosition) { return(ModuleUtility.GUIToWorld(guiPosition, planeNormal, planePosition)); }
public Vector3 GUIToWorld(Vector2 guiPosition) { return(ModuleUtility.GUIToWorld(guiPosition)); }