docs.unity3d.com
    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
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023