Configuration
interludesoftware.tick¶
Interlude.Tick¶
Configuration Struct¶
Fields¶
Configuration.AspectRatioLayouts Field¶
Predefined layout resolutions for common aspect ratios. Used when ScaleMode is ScaleWithScreenSize.
Field Value¶
System.Collections.Generic.Dictionary<System.Single,UnityEngine.Vector2Int>
Configuration.Bindings Field¶
Per-feature input bindings (navigation, textbox, console, debugger) the UI reads. Leave any field null to fall back to Interlude.Tick.InputBindings.Default. Can also be replaced wholesale at runtime via SetBindings(InputBindings).
Field Value¶
Configuration.DpiSource Field¶
Where the DPI used by ConstantPhysicalSize is read from. Defaults to UnityEngine.Screen.dpi; tests can substitute a stub.
Field Value¶
Configuration.FallbackDpi Field¶
The DPI to assume when UnityEngine.Screen.dpi reports 0 (some platforms don't expose it). Used when ScaleMode is ConstantPhysicalSize.
Field Value¶
Configuration.ReferenceDpi Field¶
The DPI the layout was authored against, used when ScaleMode is ConstantPhysicalSize. 96 is the standard desktop PPI; mobile authoring often targets 160.
Field Value¶
Configuration.Scale Field¶
Global UI-scale multiplier applied on top of the active
ScaleMode. 1.0 = native, 1.5 = 150% larger on screen,
0.75 = 75%. Folds into the layout-to-screen conversion in
UI.Layout.RefreshScaleCache so every rect, font and gap
grows or shrinks uniformly.
Values ≤ 0 are treated as 1.0, matching how FallbackDpi handles its "unset" sentinel. Useful for 4K HUDs in ConstantPixelSize where a 100-px button is otherwise readable but tiny - set 1.5 or 2.0 to compensate without changing any layout code.
Field Value¶
Configuration.ScaleMode Field¶
How layout-space pixels map to screen pixels. Default is ScaleWithScreenSize which preserves the existing per-aspect-ratio behaviour.
Field Value¶
Methods¶
Configuration.GetReferenceResolution() Method¶
Returns the layout reference resolution for the current screen size and ScaleMode. Result is cached per screen resolution for ScaleWithScreenSize.
Returns¶
Configuration.GetReferenceResolution(int, int) Method¶
Returns the layout reference resolution for the given frame size and ScaleMode. The UI scales relative to the frame it renders into (the size passed to BeginFrame), not the global screen — identical in normal use, and correct for off-screen render targets. Result is cached per frame size for ScaleWithScreenSize.
Parameters¶
screenWidth System.Int32
screenHeight System.Int32
Returns¶
Configuration.GetReferenceToScreenRatio() Method¶
Returns the per-axis ratio of screen pixels to layout pixels, used to convert between coordinate spaces.
Returns¶
Configuration.GetReferenceToScreenRatio(int, int) Method¶
Per-axis ratio of frame pixels to layout pixels for an explicit frame size.
Parameters¶
screenWidth System.Int32
screenHeight System.Int32
Returns¶
Configuration.ResolveScale() Method¶
Returns Scale with the "≤ 0 means unset" sentinel
resolved to 1.0. Read by UI.Layout.RefreshScaleCache.