Class GenericPlatform
A minimal "generic" platform. This is only really useful for manual bake avatar.
public sealed class GenericPlatform : INDMFPlatformProvider
- Inheritance
-
GenericPlatform
- Implements
- Inherited Members
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.
public Type? AvatarRootComponentType { get; }
Property Value
DisplayName
The display name of this platform. This is used in the UI to identify the platform.
public 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.
public bool HasNativeConfigData { get; }
Property Value
HasNativeUI
Indicates there is some kind of native UI window (eg the VRCSDK build window) that can be opened.
public bool HasNativeUI { get; }
Property Value
Icon
An optional icon to display in the UI for this platform.
public Texture2D? Icon { get; }
Property Value
- Texture2D?
Instance
public static INDMFPlatformProvider Instance { get; }
Property Value
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.
public string QualifiedName { get; }
Property Value
Methods
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.
public CommonAvatarInfo ExtractCommonAvatarInfo(GameObject avatarRoot)
Parameters
avatarRoot
GameObject
Returns
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.
public 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.
public void InitFromCommonAvatarInfo(GameObject avatarRoot, CommonAvatarInfo info)
Parameters
avatarRoot
GameObjectinfo
CommonAvatarInfo
OpenNativeUI()
Opens the platform native UI window.
public void OpenNativeUI()