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