Table of Contents

Class GenericPlatform

Namespace
nadena.dev.ndmf.platform

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

Type

DisplayName

The display name of this platform. This is used in the UI to identify the platform.

public string DisplayName { get; }

Property Value

string

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

bool

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

bool

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

INDMFPlatformProvider

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

string

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

CommonAvatarInfo

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 BuildContext
info 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 GameObject
info CommonAvatarInfo

OpenNativeUI()

Opens the platform native UI window.

public void OpenNativeUI()