Skip to content

EAUploader.Editor.API

Public API related to EAUploader as a whole, languages, and uploading. Defined in Editor/Public EAUploader API/EAUploader.Editor.API.cs.

using EAUploader.Editor.API;
ClassDescription
CoreAPIProvides public APIs related to EAUploader as a whole
LanguageAPIProvides public APIs related to languages
UploadAPIProvides public APIs related to uploading

CoreAPI


MethodTypeDescription
SelectedPrefabPathStringGets or sets the path of the currently selected prefab
SelectedPrefabPathChangedEventRaised when the path of the selected prefab changes
HasVRMBoolGets whether VRM is available in EAUploader
HasAvatarOptimizerBoolGets whether the Avatar Optimizer package is available
GetVersionStringGets the current version of EAUploader
ReloadVoidReloads (initializes) EAUploader
public static string SelectedPrefabPath { get; set; }
public static event Action<string> SelectedPrefabPathChanged;
public static bool HasVRM { get; }
public static bool HasAvatarOptimizer { get; }
public static string GetVersion(bool noText = false);
public static void Reload();
  • SelectedPrefabPath is null when no avatar is selected. Setting a value raises SelectedPrefabPathChanged.
  • GetVersion returns only the version number (e.g., 1.4.6) when noText is true, and a string including descriptive text such as “Version: 1.4.6” when false.
  • Reload does the same as “EAUploader” → “Reload” in the menu. The selected prefab is cleared.

LanguageAPI


MethodTypeDescription
GetCurrentLanguageStringGets the current language code
LocalizeVoidLocalizes the text of the specified VisualElement and its children
LocalizeFromJsonFileVoidLocalizes the text of the specified VisualElement and its children using the specified JSON files
GetLocalizedTextFromJsonFileStringGets the localized text for the specified key from the specified JSON files
ChangeLanguageVoidChanges the application’s language
GetAvailableLanguagesListGets the list of available languages
public static string GetCurrentLanguage();
public static void Localize(VisualElement root);
public static void LocalizeFromJsonFile(VisualElement root, string localizationFolderPath);
public static string GetLocalizedTextFromJsonFile(string key, string localizationFolderPath);
public static void ChangeLanguage(string language);
public static List<LanguageInfo> GetAvailableLanguages();
  • Language codes are en, ja, and ko.
  • Localize localizes using EAUploader’s own translation files. To localize your extension’s own strings, use LocalizeFromJsonFile.
  • For the format of the JSON files used by LocalizeFromJsonFile and GetLocalizedTextFromJsonFile, see “Quick Start Guidance”.
  • GetLocalizedTextFromJsonFile returns the key as is if no corresponding text is found.
  • ChangeLanguage changes the language in the settings file. EAUploader needs to be restarted to switch the display.
  • LanguageInfo has name (language code) and display (display name).

UploadAPI


MethodTypeDescription
OnUploadCompleteEventRaised when an upload completes
UploadProgressChangedEventRaised when the upload progress changes
BuildAndTestAsyncTaskRuns an asynchronous task that builds and tests the specified prefab
GetVRCAvatarTaskGets the VRCAvatar information of the specified prefab
UploadAvatarAsyncTaskRuns an asynchronous task that uploads the specified prefab as an avatar
UpdateVRCAvatarTaskRuns an asynchronous task that updates the VRCAvatar information of the specified prefab
public static event EventHandler OnUploadComplete;
public static event EventHandler<AvatarUploader.ProgressEventArgs> UploadProgressChanged;
public static Task BuildAndTestAsync(string prefabPath);
public static Task<VRCAvatar?> GetVRCAvatar(string prefabPath);
public static Task UploadAvatarAsync(string prefabPath, string contentName, string contentDescription, string releaseStatus, List<string> tags, string thumbnailPath);
public static Task UpdateVRCAvatar(string prefabPath, string contentName, string contentDescription, string releaseStatus, List<string> tags, string thumbnailPath);
ArgumentContents
prefabPathPath of the prefab
contentNameAvatar name
contentDescriptionAvatar description
releaseStatusRelease status (private / public)
tagsTags (content_sex, content_adult, content_violence, content_gore, content_horror, etc.)
thumbnailPathPath of the thumbnail image
  • ProgressEventArgs of UploadProgressChanged has Status (description of the progress) and Percentage (progress from 0 to 1).
  • GetVRCAvatar returns null if you are not logged in to VRChat, if the prefab has no PipelineManager or Blueprint ID, or if the avatar is not found on VRChat.
  • UploadAvatarAsync uploads a new avatar if it does not exist on VRChat, and updates the avatar if it does.
  • UpdateVRCAvatar updates information such as the name and description, and the thumbnail, without rebuilding the avatar.
  • You must be logged in to the VRChat SDK to use these methods.