docs.unity3d.com
    Show / Hide Table of Contents

    Class MarsWorldScaleModule

    Manages world scale adjustment for each scene

    Inheritance
    Object
    MarsWorldScaleModule
    Namespace: UnityEditor.MARS
    Syntax
    public class MarsWorldScaleModule : EditorScriptableSettings<MarsWorldScaleModule>, IModule

    Properties

    MaxScale

    Maximum world scale

    Declaration
    public float MaxScale { get; }
    Property Value
    Type Description
    Single

    MinScale

    Minimum world scale

    Declaration
    public float MinScale { get; }
    Property Value
    Type Description
    Single

    Methods

    AdjustWorldScale(Single)

    Adjust all the scene objects to target world scale

    Declaration
    public float AdjustWorldScale(float scale)
    Parameters
    Type Name Description
    Single scale

    New target world scale

    Returns
    Type Description
    Single

    Current world scale after adjusting

    ApplyWorldScaleToEnvironment()

    Scales synthetic environment components with scalar values not effect by the lossy scale of an object.

    Declaration
    public void ApplyWorldScaleToEnvironment()

    GetWorldScale()

    Get the current world scale in the active MARS session

    Declaration
    public static float GetWorldScale()
    Returns
    Type Description
    Single

    Current world scale

    ScaleChildren(Transform)

    Scale the child objects local position and scale by the current world scale.

    Declaration
    public static void ScaleChildren(Transform parent)
    Parameters
    Type Name Description
    Transform parent

    Parent transform of the children to scale

    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