LayoutSide¶
Source:
Assets/UpscaleSDK/Core/UI/Runtime/DeviceLayout/LayoutSide.cs
enum LayoutSide¶
Which edge of the device image an entry's row sits on. Left/Right stack rows vertically outside the device; Top/Bottom stack them horizontally above/below the device.
Values¶
LeftRightTopBottom
class LayoutSideHeuristic¶
Methods¶
public static LayoutSide FromAnchor(Vector2 anchorNorm, float sideWedgeAngle = 60f)¶
Classifies a normalized anchor (0..1, origin bottom-left) into a LayoutSide by the angle from the sprite center. Anchors whose direction from center falls within sideWedgeAngle degrees of the horizontal axis go Left/Right; anchors closer to the vertical axis go Top/Bottom. 90° forces everything Left/Right, 0° forces everything Top/Bottom, 45° gives clean diagonal quadrants. Default 60° closely matches the original gamepad layout.