private Vector3 GetMousePositionWorld(IGUIState guiState) { if (guiToWorld != null) { return(guiToWorld(guiState, guiState.mousePosition)); } return(guiState.GUIToWorld(guiState.mousePosition, hoveredControl.layoutData.forward, hoveredControl.layoutData.position)); }
private Vector3 GUIToWorld(IGUIState guiState, Vector2 guiPosition) { var forward = Vector3.forward; if (guiState.HasCurrentCamera()) { forward = Camera.current.transform.forward; } return(guiState.GUIToWorld(guiPosition, forward, Vector3.zero)); }
private Vector3 GUIToWorld(IGUIState guiState, Vector2 position) { return(guiState.GUIToWorld(position, GetForward(), GetLocalToWorldMatrix().MultiplyPoint3x4(Vector3.zero))); }