} // For scaling the children void Awake() { isOpen = false; thisGo = this.gameObject; container = UIElementFunctions.AddVLGRect(transform); container.name = "vlgRect"; container.gameObject.AddComponent <VerticalLayoutGroup>(); UIElementFunctions.ScaleRect(container, 0, 0); container.anchorMin = new Vector2(0, 0); container.anchorMax = new Vector2(1, 0); }
void Awake() { isOpen = false; thisGo = this.gameObject; container = UIElementFunctions.AddTextRect(transform); container.name = "vlgRect"; container.gameObject.AddComponent <VerticalLayoutGroup>(); UIElementFunctions.ScaleRect(container, 0, 0); // Do I need to do this? container.anchorMin = new Vector2(1, 0); container.anchorMax = new Vector2(1, 0); container.pivot = new Vector2(0, 0); container.sizeDelta = new Vector2(160, 32); }