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