Class MARSWorldScaleModule | MARS | 1.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class MARSWorldScaleModule

    Manages world scale adjustment for each scene

    Inheritance
    Object
    ScriptableSettingsBase
    ScriptableSettingsBase<MARSWorldScaleModule>
    EditorScriptableSettings<MARSWorldScaleModule>
    MARSWorldScaleModule
    Inherited Members
    EditorScriptableSettings<MARSWorldScaleModule>.instance
    ScriptableSettingsBase<MARSWorldScaleModule>.k_HasCustomPath
    ScriptableSettingsBase<MARSWorldScaleModule>.s_Instance
    ScriptableSettingsBase<MARSWorldScaleModule>.Save(String)
    ScriptableSettingsBase<MARSWorldScaleModule>.GetFilePath()
    ScriptableSettingsBase.k_PathExceptionMessage
    ScriptableSettingsBase.GetInstanceByType(Type)
    ScriptableSettingsBase.OnLoaded()
    Namespace: Unity.MARS
    Syntax
    public class MARSWorldScaleModule : EditorScriptableSettings<MARSWorldScaleModule>, IModule

    Properties

    largeScaleIcon

    Declaration
    public MARSWorldScaleModule.ScaleVisual largeScaleIcon { get; }
    Property Value
    Type Description
    MARSWorldScaleModule.ScaleVisual

    maxScale

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

    maxScaleExponent

    Declaration
    public int maxScaleExponent { get; }
    Property Value
    Type Description
    Int32

    minScale

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

    minScaleExponent

    Declaration
    public int minScaleExponent { get; }
    Property Value
    Type Description
    Int32

    scaleOneIcon

    Declaration
    public MARSWorldScaleModule.ScaleVisual scaleOneIcon { get; }
    Property Value
    Type Description
    MARSWorldScaleModule.ScaleVisual

    smallScaleIcon

    Declaration
    public MARSWorldScaleModule.ScaleVisual smallScaleIcon { get; }
    Property Value
    Type Description
    MARSWorldScaleModule.ScaleVisual

    visualsZeroIndex

    Declaration
    public int visualsZeroIndex { get; }
    Property Value
    Type Description
    Int32

    Methods

    AdjustWorldScale(Single)

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

    ApplyWorldScaleToEnvironment()

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

    Declaration
    public void ApplyWorldScaleToEnvironment()

    ClearEnvironmentRangeScaledComponents()

    Clears the list of Components that have scalar values that need world scale applied to them

    Declaration
    public void ClearEnvironmentRangeScaledComponents()

    GetEnvironmentRangeScaledComponents(GameObject)

    Gets Components that have values that need world scale applied to them.

    Declaration
    public void GetEnvironmentRangeScaledComponents(GameObject go)
    Parameters
    Type Name Description
    GameObject go

    game object that we are getting components on

    GetWorldScale()

    Declaration
    public static float GetWorldScale()
    Returns
    Type Description
    Single

    LoadModule()

    Declaration
    public void LoadModule()
    Implements
    IModule.LoadModule()

    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

    UnloadModule()

    Declaration
    public void UnloadModule()
    Implements
    IModule.UnloadModule()

    UpdateScaleReference()

    Declaration
    public void UpdateScaleReference()
    Back to top
    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