Skip to Content

Row

GnosisUIElementRow is a display element (elementId = "Row") for horizontal child layout.

Attach a HorizontalLayoutGroup on the same GameObject (or child, if you assign it in the inspector). At runtime, CreateElement parameters map to the same fields Unity exposes on HorizontalOrVerticalLayoutGroup / LayoutGroup.

Runtime parameters

In addition to built-in element parameters, GnosisUIElementRow supports:

  • spacing (float)
  • padding (object) — { left, right, top, bottom } (integers). Merges with the current padding; unspecified sides keep their previous values.
  • paddingLeft, paddingRight, paddingTop, paddingBottom (int) — merge over current padding when set.
  • childAlignment (string) — TextAnchor name (e.g. UpperLeft, MiddleCenter, LowerRight).
  • childForceExpandWidth, childForceExpandHeight (bool)
  • childControlWidth, childControlHeight (bool)
  • childScaleWidth, childScaleHeight (bool)
  • reverseArrangement (bool)

Example — JSON payload shape

{ "service": "GameUI", "function": "CreateElement", "parameters": { "elementId": "Row", "parentId": "ui.Panel", "parameters": { "name": "ActionRow", "spacing": 12.0, "padding": { "left": 8, "right": 8, "top": 4, "bottom": 4 }, "childAlignment": "MiddleCenter", "childForceExpandWidth": false, "childForceExpandHeight": false, "childControlWidth": true, "childControlHeight": true, "childScaleWidth": false, "childScaleHeight": false, "reverseArrangement": false } } }

Example — DescribeUIElement

payload.Set("elementId", "Row"); return CallService("GameUI", "DescribeUIElement", payload);
Last updated on