Skip to content

EAUploader.Editor.Plugin.API

Public API related to registering extensions (plugins). Defined in Editor/Public EAUploader API/EAUploader.Editor.Plugin.API.cs.

using EAUploader.Editor.Plugin.API;
ClassDescription
PluginAPIProvides public APIs related to plugins
PluginAPI.EditorRegistrationRepresents editor registration information
PluginAPI.EAUPluginAttributeAttribute for specifying a plugin’s initialization method

PluginAPI


MethodTypeDescription
OnEditorRegisteredEventRaised when a new editor is registered
OnEditorManagerLoadVoidLoads (initializes) the editor manager
RegisterEditorVoidRegisters a new editor
GetRegisteredEditorsIEnumerableGets the list of registered editors
public static event EAUploaderEditorManager.EditorRegisteredHandler OnEditorRegistered;
public static void OnEditorManagerLoad();
public static void RegisterEditor(PluginAPI.EditorRegistration editorRegistration);
public static IEnumerable<PluginAPI.EditorRegistration> GetRegisteredEditors();
  • RegisterEditor works the same as EAUploaderEditorManager.RegisterEditor. Registered editors are shown in “Edit tool” in the Setup tab.
  • OnEditorManagerLoad is the process called when EAUploader starts. Extensions normally do not need to call it.

PluginAPI.EditorRegistration


PropertyTypeDescription
MenuNameStringPath of the menu executed when the button is pressed
EditorNameStringName shown in the edit tool list
DescriptionStringDescription
VersionStringVersion
AuthorStringAuthor
UrlStringURL of a support page, etc.
RequirementFunc<string, bool>Method that decides whether the editor can be used. The path of the selected prefab is passed as the argument
RequirementDescriptionStringMessage shown when the editor cannot be used

For details on each property, see “Quick Start Guidance”.

PluginAPI.EAUPluginAttribute


Attribute for specifying a plugin’s initialization method.

using EAUploader;
using EAUploader.Editor.Plugin.API;
public static class MyPlugin
{
[EAUPlugin] // EAUploader.EAUPluginAttribute
private static void Initialize()
{
PluginAPI.RegisterEditor(new PluginAPI.EditorRegistration
{
MenuName = "Tools/My Avatar Tool",
EditorName = "My Avatar Tool",
Description = "Description of my tool",
Version = "0.1.0",
Author = "Your Name",
});
}
}