Class MarsWorldScaleModule
Manages world scale adjustment for each scene
Inheritance
ScriptableSettingsBase
ScriptableSettingsBase<MarsWorldScaleModule>
EditorScriptableSettings<MarsWorldScaleModule>
MarsWorldScaleModule
Implements
IModule
Inherited Members
EditorScriptableSettings<MarsWorldScaleModule>.instance
ScriptableSettingsBase<MarsWorldScaleModule>.k_HasCustomPath
ScriptableSettingsBase<MarsWorldScaleModule>.s_Instance
ScriptableSettingsBase<MarsWorldScaleModule>.GetFilePath()
ScriptableSettingsBase.k_PathExceptionMessage
ScriptableSettingsBase.OnLoaded()
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEditor.MARS
Assembly: Unity.MARS.Editor.dll
Syntax
[MovedFrom(true, "Unity.MARS", null, null)]
public class MarsWorldScaleModule : EditorScriptableSettings<MarsWorldScaleModule>, IModule
Properties
MaxScale
Maximum world scale
Declaration
public float MaxScale { get; }
Property Value
Type | Description |
---|---|
float |
MinScale
Minimum world scale
Declaration
public float MinScale { get; }
Property Value
Type | Description |
---|---|
float |
Methods
AdjustWorldScale(float)
Adjust all the scene objects to target world scale
Declaration
public float AdjustWorldScale(float scale)
Parameters
Type | Name | Description |
---|---|---|
float | scale | New target world scale |
Returns
Type | Description |
---|---|
float | 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 |
---|---|
float | 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 |
Implements
Unity.XRTools.ModuleLoader.IModule