Beispiel #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();
 }
Beispiel #2
0
 public static Object GetAsset(SkillStateAction action)
 {
     if (action != null)
     {
         return(ActionScripts.GetAsset(action.GetType()));
     }
     return(null);
 }
Beispiel #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)));
        }
Beispiel #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));
        }
Beispiel #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()));
        }
Beispiel #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));
        }
Beispiel #7
0
 public static Object GetActionScriptAsset(Type actionType)
 {
     return(ActionScripts.GetAsset(actionType));
 }
Beispiel #8
0
 public static Object GetActionScriptAsset(SkillStateAction action)
 {
     return(ActionScripts.GetAsset(action));
 }
Beispiel #9
0
 public static void EditActionTypeScript(object userdata)
 {
     ActionScripts.EditAssetByType(userdata);
 }
Beispiel #10
0
 public static void FindActionTypeScript(object userdata)
 {
     ActionScripts.PingAssetByType(userdata);
 }