Class MarsWorldScaleModule
Manages world scale adjustment for each scene
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 |