Add grid scale to the editor viewport settings
This commit is contained in:
@@ -49,17 +49,17 @@ namespace FlaxEditor.Gizmo
|
||||
float space, size;
|
||||
if (dst <= 500.0f)
|
||||
{
|
||||
space = 50;
|
||||
space = Editor.Instance.Options.Options.Viewport.ViewportGridScale;
|
||||
size = 8000;
|
||||
}
|
||||
else if (dst <= 2000.0f)
|
||||
{
|
||||
space = 100;
|
||||
space = Editor.Instance.Options.Options.Viewport.ViewportGridScale * 2;
|
||||
size = 8000;
|
||||
}
|
||||
else
|
||||
{
|
||||
space = 1000;
|
||||
space = Editor.Instance.Options.Options.Viewport.ViewportGridScale * 20;
|
||||
size = 100000;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,5 +59,12 @@ namespace FlaxEditor.Options
|
||||
[DefaultValue(false)]
|
||||
[EditorDisplay("Defaults"), EditorOrder(150), Tooltip("Invert the panning direction for the viewport camera.")]
|
||||
public bool DefaultInvertPanning { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Scales editor viewport grid.
|
||||
/// </summary>
|
||||
[DefaultValue(50.0f), Limit(25.0f, 500.0f, 5.0f)]
|
||||
[EditorDisplay("Defaults"), EditorOrder(160), Tooltip("Scales editor viewport grid.")]
|
||||
public float ViewportGridScale { get; set; } = 50.0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user