void Update() { if (!m_DragState.active) { m_Selection = Utility.PickFace(m_SceneCamera, Input.mousePosition); } HandleInput(); }
internal static MeshAndFace PickFace(Camera camera, Vector3 mousePosition) { var res = new MeshAndFace(); var go = PickObject(camera, mousePosition); if (go == null || !(res.mesh = go.GetComponent <ProBuilderMesh>())) { return(res); } res.face = SelectionPicker.PickFace(camera, mousePosition, res.mesh); return(res); }