Interface INDMFPlatformProvider
public interface INDMFPlatformProvider
Properties
AvatarRootComponentType
The component type which marks the root of the avatar. If unset, we will use NDMFAvatarRoot instead.
This is used to identify the "primary" platform for the avatar, in addition to identifying the avatar root itself.
Type? AvatarRootComponentType { get; }
Property Value
DisplayName
The display name of this platform. This is used in the UI to identify the platform.
string DisplayName { get; }
Property Value
HasNativeConfigData
If true, this platform has some kind of avatar-wide native configuration components. Currently, this controls whether NDMFAvatarRoot's inspector offers to convert configuration to/from this platform.
bool HasNativeConfigData { get; }
Property Value
HasNativeUI
Indicates there is some kind of native UI window (eg the VRCSDK build window) that can be opened.
bool HasNativeUI { get; }
Property Value
Icon
An optional icon to display in the UI for this platform.
Texture2D? Icon { get; }
Property Value
- Texture2D?
QualifiedName
The internal fully qualified name of this platform. This is used when declaring platform compatibility.
See WellKnownPlatforms
for a list of well-known platform qualified names.
string QualifiedName { get; }
Property Value
Methods
CanInitFromCommonAvatarInfo(GameObject, CommonAvatarInfo)
Return true if we can initialize this platform's native config from the provided common config structure.
bool CanInitFromCommonAvatarInfo(GameObject avatarRoot, CommonAvatarInfo info)
Parameters
avatarRoot
GameObjectinfo
CommonAvatarInfo
Returns
CreateBuildUI()
Creates a UI Elements element to use as the build control UI to be shown in the NDMF console when this platform is selected.
BuildUIElement? CreateBuildUI()
Returns
ExtractCommonAvatarInfo(GameObject)
Extracts information from platform-specific components on the avatar, and presents it as a CommonAvatarInfo object. The platform may choose only to supply a subset of the information in the CAI structure.
CommonAvatarInfo ExtractCommonAvatarInfo(GameObject avatarRoot)
Parameters
avatarRoot
GameObject
Returns
GeneratePortableComponents(GameObject, bool)
When this platform is not the selected platform, but is the "primary" platform for an avatar, create portable NDMF components to represent platform-specific dynamics (e.g. dynamic bones).
This function may be invoked either at build time, or in response to user action. If the latter, registerUndo will be true, and any actions performed should be registered in the Unity undo system.
void GeneratePortableComponents(GameObject avatarRoot, bool registerUndo)
Parameters
avatarRoot
GameObjectregisterUndo
bool
InitBuildFromCommonAvatarInfo(BuildContext, CommonAvatarInfo)
This method is invoked early in the build process (between FirstChance and PlatformInit), and is provided with a CommonAvatarInfo structure with any configuration extracted from portable components, or components from the primary platform for the avatar.
void InitBuildFromCommonAvatarInfo(BuildContext context, CommonAvatarInfo info)
Parameters
context
BuildContextinfo
CommonAvatarInfo
InitFromCommonAvatarInfo(GameObject, CommonAvatarInfo)
Destructively initialize or overwrite this platform's native config from this common config structure. The caller will take care of undo and prefab override management, if necessary.
void InitFromCommonAvatarInfo(GameObject avatarRoot, CommonAvatarInfo info)
Parameters
avatarRoot
GameObjectinfo
CommonAvatarInfo
OpenNativeUI()
Opens the platform native UI window.
void OpenNativeUI()