internal static void MoveViewMechButton(MechLabPanel panel) { var adapter = new MechLabPanelAdapter(panel); var vb = adapter.btn_mechViewerButton; var rect = vb.GetComponent <RectTransform>(); // below works similar to OBJ_value rect.anchorMin = new Vector2(1, 1); rect.anchorMax = new Vector2(1, 1); rect.pivot = new Vector2(1, 1); rect.anchoredPosition = new Vector2(-32, -780); }
static void FixMechLabMechInfoWidgetLayout(MechLabPanel panel) { var panelAdapter = new MechLabPanelAdapter(panel); var widgetAdapter = new MechLabMechInfoWidgetAdapter(panelAdapter.mechInfoWidget); var hardpoints = widgetAdapter.hardpoints; { var container = hardpoints[3].transform.parent; container.parent.GetChild("OBJ_stockBttn")?.gameObject?.Destroy(); { var jjparent = hardpoints[4].transform.parent; if (jjparent != container) { hardpoints[4].transform.parent = container; jjparent.gameObject.Destroy(); } } FixElementsContainerLayout(container.gameObject); }