예제 #1
0
 public static void BuildList()
 {
     Actions.actionsList.Clear();
     Assembly[] assemblies = AppDomain.get_CurrentDomain().GetAssemblies();
     for (int i = 0; i < assemblies.Length; i++)
     {
         Assembly assembly = assemblies[i];
         try
         {
             Type[] exportedTypes = assembly.GetExportedTypes();
             Type[] array         = exportedTypes;
             for (int j = 0; j < array.Length; j++)
             {
                 Type type = array[j];
                 if (typeof(ISkillStateAction).IsAssignableFrom(type) && type.get_IsClass() && !type.get_IsAbstract() && (!FsmEditorSettings.HideObsoleteActions || (FsmEditorSettings.HideObsoleteActions && !CustomAttributeHelpers.IsObsolete(type))))
                 {
                     Actions.actionsList.Add(type);
                 }
             }
         }
         catch (Exception ex)
         {
             NotSupportedException arg_90_0 = ex as NotSupportedException;
         }
     }
     Actions.BuildCategoryList();
     Actions.InitCategories();
     Actions.UpdateUsage();
     ActionScripts.Init();
     ActionTargets.Init();
 }
예제 #2
0
 public static Object GetAsset(SkillStateAction action)
 {
     if (action != null)
     {
         return(ActionScripts.GetAsset(action.GetType()));
     }
     return(null);
 }
예제 #3
0
        public static void Edit(Type actionType)
        {
            Object asset = ActionScripts.GetAsset(actionType);

            if (asset != null)
            {
                AssetDatabase.OpenAsset(asset);
                return;
            }
            Debug.LogError(string.Format(Strings.get_Error_Missing_Script(), Labels.GetActionLabel(actionType)));
        }
예제 #4
0
        public static void PingAssetByType(object userdata)
        {
            Type   type  = (Type)userdata;
            Object asset = ActionScripts.GetAsset(type);

            if (asset != null)
            {
                EditorGUIUtility.PingObject(asset);
                return;
            }
            Debug.LogError(string.Format(Strings.get_Error_Missing_Script(), type));
        }
예제 #5
0
        public static void EditAsset(object userdata)
        {
            SkillStateAction fsmStateAction = (SkillStateAction)userdata;
            Object           asset          = ActionScripts.GetAsset(fsmStateAction);

            if (asset != null)
            {
                AssetDatabase.OpenAsset(asset);
                return;
            }
            Debug.LogError(string.Format(Strings.get_Error_Missing_Script(), fsmStateAction.get_Name()));
        }
예제 #6
0
        public static void EditAssetByType(object userdata)
        {
            Type   type  = (Type)userdata;
            Object asset = ActionScripts.GetAsset(type);

            if (asset != null)
            {
                AssetDatabase.OpenAsset(asset);
                return;
            }
            Debug.LogError(string.Format(Strings.get_Error_Missing_Script(), type));
        }
예제 #7
0
 public static Object GetActionScriptAsset(Type actionType)
 {
     return(ActionScripts.GetAsset(actionType));
 }
예제 #8
0
 public static Object GetActionScriptAsset(SkillStateAction action)
 {
     return(ActionScripts.GetAsset(action));
 }
예제 #9
0
 public static void EditActionTypeScript(object userdata)
 {
     ActionScripts.EditAssetByType(userdata);
 }
예제 #10
0
 public static void FindActionTypeScript(object userdata)
 {
     ActionScripts.PingAssetByType(userdata);
 }