Public API related to operating on prefabs and getting their information.
Defined in EAUploader.Editor.Prefab.API.cs, EAUploader.Editor.PrefabPreview.API.cs, EAUploader.Editor.Shader.API.cs, EAUploader.Editor.PrefabUtility.API.cs, and EAUploader.Editor.VRM.API.cs in Editor/Public EAUploader API/ (one class per file).
usingEAUploader.Editor.Prefab.API;
Class
Description
PrefabAPI
Provides prefab operations and information
PrefabPreviewAPI
Provides prefab preview images
ShaderAPI
Provides shader checks
PrefabUtilityAPI
Provides avatar information
VRMAPI
Provides VRM import (only when VRM Converter for VRChat is installed)
PrefabAPI
Method
Type
Description
UpdatePrefabInfo
Void
Re-initializes the managed prefabs (managed folder, migration, missing preview images)
ImportPrefab
Void
Brings the prefab at the specified path into EAUploader (creates or updates a managed Prefab Variant)
GetPrefab
GameObject
Gets the prefab at the specified path
ShowDeletePrefabDialog
Bool
Shows the prefab deletion confirmation
DeletePrefabPreview
Void
Deletes the preview image of the prefab at the specified path
PinPrefab
Void
Toggles pinning of the prefab at the specified path
GetAvatarDescriptor
VRCAvatarDescriptor
Gets the VRCAvatarDescriptor of the prefab at the specified path
IsPinned
Bool
Checks whether the prefab at the specified path is pinned
GetPrefab and GetAvatarDescriptor return null if the prefab is not found.
ImportPrefab creates a managed Prefab Variant (Assets/EAUploader/Prefabs/<item name>/) for an unmanaged prefab, and updates the information for a managed one. The source prefab is not changed. No Variant is created for prefabs outside Assets/, inside Assets/EAUploader/, or that already have a Variant.
ShowDeletePrefabDialog(path, completed) opens the deletion confirmation modal inside the EAUploader window and returns true if the modal opened. completed(true) is called when deletion completes, and completed(false) when cancelled. Together with the prefab, the source prefab and materials and textures used only by that item are also deleted.
The one-argument ShowDeletePrefabDialog(path) is [Obsolete]. For compatibility, it shows Unity’s standard confirmation dialog and returns true when deletion completes.
PinPrefab pins the prefab if it is not pinned, and unpins it if it is.
SavePrefab saves the GameObject as a prefab at the specified path and runs ImportPrefab.
PrefabPreviewAPI
Method
Type
Description
GeneratePreview
Texture2D
Generates a preview image of a prefab
GenerateAndSaveAllPrefabPreviews
Void
Generates and saves preview images for all prefabs that do not have one