コード例 #1
0
        /// <summary>
        /// This method can be called to redo the action.
        /// </summary>
        public void Redo()
        {
            EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance;

            gizmoSystem.TurnOffGizmos();
            GizmosTurnedOffMessage.SendToInterestedListeners(_activeGizmoType);
        }
コード例 #2
0
        /// <summary>
        /// Executes the action.
        /// </summary>
        public void Execute()
        {
            // Execute the action if the gizmos are not already turned off
            EditorGizmoSystem gizmoSystem = EditorGizmoSystem.Instance;

            if (!gizmoSystem.AreGizmosTurnedOff)
            {
                gizmoSystem.TurnOffGizmos();
                GizmosTurnedOffMessage.SendToInterestedListeners(_activeGizmoType);
                EditorUndoRedoSystem.Instance.RegisterAction(this);
            }
        }
コード例 #3
0
        /// <summary>
        /// Convenience function for sending a gizmos turned off message to
        /// all interested listeners.
        /// </summary>
        /// <param name="activeGizmoType">
        /// This represents the type of gizmo that was active before the gizmos
        /// were turned off.
        /// </param>
        public static void SendToInterestedListeners(GizmoType activeGizmoType)
        {
            var message = new GizmosTurnedOffMessage(activeGizmoType);

            MessageListenerDatabase.Instance.SendMessageToInterestedListeners(message);
        }