Class BuildPhase
Build Phases provide a coarse mechanism for grouping passes for execution. Each build phase has a recommended usage to help avoid ordering conflicts without needing explicit constraints.
Currently, the following phases are defined:
- Resolving
- Generating
- Transforming
- Optimizing
public sealed class BuildPhase
- Inheritance
-
BuildPhase
- Inherited Members
Fields
BuiltInPhases
This list contains all built-in phases in the order that they will be executed.
public static readonly ImmutableList<BuildPhase> BuiltInPhases
Field Value
FirstChance
The FirstChance build phase runs before platform initialization, and should be used for plugins that need to run before absolutely everything else. For example, if you want to replace the entire avatar with a different one, this is probably the time to do it.
For compatibility reasons, EditorOnly objects are not removed in this phase. You'll need to exclude them yourself :(
public static readonly BuildPhase FirstChance
Field Value
Generating
The generating phase is intended for use by asses which generate components used by later plugins. For example, if you want to generate components that will be used by Modular Avatar, this would be the place to do it.
public static readonly BuildPhase Generating
Field Value
Optimizing
The optimizing phase is intended for pure optimizations that need to run late in the build process.
public static readonly BuildPhase Optimizing
Field Value
PlatformFinish
The platform finish phase is run after optimizations, and is intended for platform-specific cleanup and validation. For example, validating that we haven't exceeded the VRChat parameter limit.
public static readonly BuildPhase PlatformFinish
Field Value
PlatformInit
The PlatformInit phase runs early in the build process, and is intended for platform backend initialization. Note that syncing of platform configuration - e.g. ExtractCommonAvatarInfo - is done before PlatformInit (but after FirstChance).
For compatibility reasons, EditorOnly objects are not removed in this phase. You'll need to exclude them yourself :(
public static readonly BuildPhase PlatformInit
Field Value
Resolving
The resolving phase is intended for use by passes which perform very early processing of components and avatar state, before any large-scale changes have been made. For example, Modular Avatar uses this phase to resolve string-serialized object passes to their destinations, and to clone animation controllers before any changes are made to them.
NDMF also has a built-in phase in Resolving, which removes EditorOnly objects. For more information, see nadena.dev.ndmf.builtin.RemoveEditorOnlyPass.
public static readonly BuildPhase Resolving
Field Value
Transforming
The transforming phase is intended for general-purpose avatar transformations. Most of Modular Avatar's logic runs here.
public static readonly BuildPhase Transforming
Field Value
Properties
Name
public string Name { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.