docs.unity.cn
    Show / Hide Table of Contents

    Class TransformScalingMergeBehavior

    Adjusts local scales in the model's hierarchy when merging models to prevent deformations / skewing caused by parenting game objects to non-uniformly scaled parents.

    Inheritance
    Object
    TransformScalingMergeBehavior
    Namespace: Unity.Industrial.Forma.Core.MeshMerge
    Syntax
    public class TransformScalingMergeBehavior : IMergeBehavior

    Properties

    PreserveLocalScales

    Enable to preserve all local transform scales in the hierarchy that aren't equal to (1, 1, 1). Only skewed scales will be preserved if this is disabled.

    Declaration
    public bool PreserveLocalScales { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    Enabling this may result in less optimized merged models as a new root node is needed for each transform that has a local scale other than (1, 1, 1).

    ShowWarnings

    Displays a warning when a node's scale needs to be adjusted and can't be merged.

    Declaration
    public bool ShowWarnings { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    PostMerge(MergedModel)

    Called after the meshes have been merged. Implement post-merge behavior here.

    Declaration
    public void PostMerge(MergedModel mergedModel)
    Parameters
    Type Name Description
    MergedModel mergedModel

    The MergedModel instance that was merged.

    Implements
    IMergeBehavior.PostMerge(MergedModel)

    PreMerge(MergedModel, Transform)

    Called before the originalRoot meshes are merged. Implement pre-merge behavior here

    Declaration
    public void PreMerge(MergedModel mergedModel, Transform originalRoot)
    Parameters
    Type Name Description
    MergedModel mergedModel

    The MergedModel instance will have its meshes merged.

    Transform originalRoot

    The root node of the hierarchy that will be merged.

    Implements
    IMergeBehavior.PreMerge(MergedModel, Transform)
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on September 6, 2022
    Terms of use