Class BuildContext
The BuildContext is passed to all plugins during the build process. It provides access to the avatar being built, as well as various other context information.
public sealed class BuildContext
- Inheritance
-
BuildContext
- Inherited Members
Constructors
BuildContext(GameObject, string, bool)
public BuildContext(GameObject obj, string assetRootPath, bool isClone = true)
Parameters
Properties
AssetContainer
An asset container that can be used to store generated assets. NDMF will automatically add any objects referenced by the avatar to this container when the build completes, but in some cases it can be necessary to manually save assets (e.g. when using AnimatorController builtins).
public UnityEngine.Object AssetContainer { get; }
Property Value
AssetSaver
public IAssetSaver AssetSaver { get; }
Property Value
AvatarRootObject
The root GameObject of the avatar being built.
public GameObject AvatarRootObject { get; }
Property Value
- GameObject
AvatarRootTransform
The root Transform of the avatar being built.
public Transform AvatarRootTransform { get; }
Property Value
- Transform
ErrorReport
public ErrorReport ErrorReport { get; }
Property Value
ObjectRegistry
public ObjectRegistry ObjectRegistry { get; }
Property Value
Successful
public bool Successful { get; }
Property Value
Methods
ActivateExtensionContext(Type)
public IExtensionContext ActivateExtensionContext(Type ty)
Parameters
ty
Type
Returns
ActivateExtensionContext<T>()
public T ActivateExtensionContext<T>() where T : IExtensionContext
Returns
- T
Type Parameters
T
DeactivateExtensionContext(Type)
public void DeactivateExtensionContext(Type t)
Parameters
t
Type
DeactivateExtensionContext<T>()
public void DeactivateExtensionContext<T>() where T : IExtensionContext
Type Parameters
T
Extension<T>()
public T Extension<T>() where T : IExtensionContext
Returns
- T
Type Parameters
T
GetState<T>()
public T GetState<T>() where T : new()
Returns
- T
Type Parameters
T
GetState<T>(Func<BuildContext, T>)
public T GetState<T>(Func<BuildContext, T> init)
Parameters
init
Func<BuildContext, T>
Returns
- T
Type Parameters
T
IsTemporaryAsset(Object)
public bool IsTemporaryAsset(UnityEngine.Object obj)
Parameters
obj
Object
Returns
OpenSerializationScope()
public SerializationScope OpenSerializationScope()
Returns
Serialize()
public void Serialize()
SetEnableUVDistributionRecalculation(Mesh, bool)
NDMF will automatically invoke RecalculateUVDistributionMetrics on all temporary asset meshes to ensure they work properly with streaming mipmaps. If you don't want this to happen for a specific mesh (eg if you invoked RecalculateUVDistributionMetric with a specific UV channel), invoke this function with enabled=false to opt out.
public void SetEnableUVDistributionRecalculation(Mesh mesh, bool enabled)
Parameters
mesh
MeshThe mesh to control
enabled
boolFalse to disable UV distribution recalculation