Table of Contents

Interface IParameterProvider

Namespace
nadena.dev.ndmf

Provides information about parameters supplied by a (custom) component.

public interface IParameterProvider

Methods

GetSuppliedParameters(BuildContext)

Returns the set of VRChat expression parameters supplied by this specific component.

When processing from within the context of a build, a BuildContext parameter will be supplied. This can be used to ensure that generated parameter names are consistent within a single build. However, you should avoid changing the number or type of synced parameters, to ensure that parameter usage estimates are correct.

This method should not consider parameter renames. If you need to remap names, do that either in your own build pass logic, or by converting to e.g. Modular Avatar Parameters objects at build time.

Finally, the parameter objects that are returned from this function must be newly created on each call. This is because subsequent processing may modify these objects (e.g. remapping names).

IEnumerable<ProvidedParameter> GetSuppliedParameters(BuildContext context = null)

Parameters

context BuildContext

The build context, if available. Note that this method may be called outside of a build (e.g. to query parameter usage from editor UI)

Returns

IEnumerable<ProvidedParameter>

RemapParameters(ref ImmutableDictionary<(ParameterNamespace, string), ParameterMapping>, BuildContext)

Remap the names of parameters within this GameObject and its children. On entry, nameMap will contain the mappings effective at the parent object (or prior component within this game object). This method should update nameMap with any remappings it would like to apply. nameMap should be a mapping of "internal name" (the name used within children and components at or after this component) to "external name" (the name used at the parent game object, or possibly at the final built avatar level).

void RemapParameters(ref ImmutableDictionary<(ParameterNamespace, string), ParameterMapping> nameMap, BuildContext context = null)

Parameters

nameMap ImmutableDictionary<(ParameterNamespace, string), ParameterMapping>
context BuildContext