Ejemplo n.º 1
0
        protected virtual void OnSceneGUI()
        {
            //mandatory update as for strange reason the serialized rollback one update here
            m_UIState.Update();
            m_SerializedHDProbe.Update();

            HDProbeUI.DrawHandles(m_UIState, m_SerializedHDProbe, this);
            m_UIState.DoShortcutKey(this);
        }
        protected void OnSceneGUI()
        {
            m_SerializedHDProbe.Update();

            EditorGUI.BeginChangeCheck();
            HDProbeUI.DrawHandles(m_SerializedHDProbe, this);
            HDProbeUI.Drawer <TProvider> .DoToolbarShortcutKey(this);

            DrawHandles(m_SerializedHDProbe, this);
            if (EditorGUI.EndChangeCheck())
            {
                m_SerializedHDProbe.Apply();
            }
        }
Ejemplo n.º 3
0
        protected void OnSceneGUI()
        {
            EditorGUI.BeginChangeCheck();
            var soo = m_SerializedHDProbePerTarget[target];

            soo.Update();
            HDProbeUI.DrawHandles(soo, this);

            HDProbeUI.Drawer <TProvider> .DoToolbarShortcutKey(this);

            DrawHandles(soo, this);
            if (EditorGUI.EndChangeCheck())
            {
                soo.Apply();
            }
        }
Ejemplo n.º 4
0
        internal static void DrawHandles(PlanarReflectionProbeUI s, SerializedPlanarReflectionProbe d, Editor o)
        {
            PlanarReflectionProbe probe = d.target;

            HDProbeUI.DrawHandles(s, d, o);

            if (probe.useMirrorPlane)
            {
                var m   = Handles.matrix;
                var mat = Matrix4x4.TRS(probe.transform.position, probe.transform.rotation, Vector3.one * 1.5f);
                using (new Handles.DrawingScope(k_GizmoMirrorPlaneCamera, mat))
                {
                    Handles.ArrowHandleCap(
                        0,
                        probe.captureMirrorPlaneLocalPosition,
                        Quaternion.LookRotation(probe.captureMirrorPlaneLocalNormal),
                        HandleUtility.GetHandleSize(probe.captureMirrorPlaneLocalPosition),
                        Event.current.type
                        );
                }
            }
        }