예제 #1
0
 public static void MenuCallback(object callbackObject)
 {
     MenuUtils.MenuCallbackObject menuCallbackObject = callbackObject as MenuUtils.MenuCallbackObject;
     if (menuCallbackObject.temporaryContext != null)
     {
         EditorApplication.ExecuteMenuItemWithTemporaryContext(menuCallbackObject.menuItemPath, menuCallbackObject.temporaryContext);
     }
     else
     {
         EditorApplication.ExecuteMenuItem(menuCallbackObject.menuItemPath);
     }
 }
예제 #2
0
        public static void MenuCallback(object callbackObject)
        {
            MenuCallbackObject obj2 = callbackObject as MenuCallbackObject;

            if (obj2.temporaryContext != null)
            {
                EditorApplication.ExecuteMenuItemWithTemporaryContext(obj2.menuItemPath, obj2.temporaryContext);
            }
            else
            {
                EditorApplication.ExecuteMenuItem(obj2.menuItemPath);
            }
        }
예제 #3
0
        public static void MenuCallback(object callbackObject)
        {
            MenuCallbackObject obj2 = callbackObject as MenuCallbackObject;

            if (obj2.onBeforeExecuteCallback != null)
            {
                obj2.onBeforeExecuteCallback(obj2.menuItemPath, obj2.temporaryContext, obj2.userData);
            }
            if (obj2.temporaryContext != null)
            {
                EditorApplication.ExecuteMenuItemWithTemporaryContext(obj2.menuItemPath, obj2.temporaryContext);
            }
            else
            {
                EditorApplication.ExecuteMenuItem(obj2.menuItemPath);
            }
            if (obj2.onAfterExecuteCallback != null)
            {
                obj2.onAfterExecuteCallback(obj2.menuItemPath, obj2.temporaryContext, obj2.userData);
            }
        }
예제 #4
0
 public static void MenuCallback(object callbackObject)
 {
     MenuUtils.MenuCallbackObject menuCallbackObject = callbackObject as MenuUtils.MenuCallbackObject;
     if (menuCallbackObject.onBeforeExecuteCallback != null)
     {
         menuCallbackObject.onBeforeExecuteCallback(menuCallbackObject.menuItemPath, menuCallbackObject.temporaryContext, menuCallbackObject.userData);
     }
     if (menuCallbackObject.temporaryContext != null)
     {
         EditorApplication.ExecuteMenuItemWithTemporaryContext(menuCallbackObject.menuItemPath, menuCallbackObject.temporaryContext);
     }
     else
     {
         EditorApplication.ExecuteMenuItem(menuCallbackObject.menuItemPath);
     }
     if (menuCallbackObject.onAfterExecuteCallback == null)
     {
         return;
     }
     menuCallbackObject.onAfterExecuteCallback(menuCallbackObject.menuItemPath, menuCallbackObject.temporaryContext, menuCallbackObject.userData);
 }