private void Init(PrepareScreen prepareScreen) { gradient = CreateChild <UguiSprite>("gradient", 0); { gradient.Anchor = AnchorType.Fill; gradient.RawSize = Vector2.zero; gradient.SpriteName = "gradation-top"; gradient.Color = new Color(0f, 0f, 0f, 0.75f); } listContainer = CreateChild <UguiObject>("list-container", 1); { listContainer.Anchor = AnchorType.TopStretch; listContainer.Pivot = PivotType.Top; listContainer.RawWidth = 0f; listContainer.Height = 64f; listContainer.Y = -prepareScreen.MenuBarHeight; versionList = listContainer.CreateChild <UguiListView>("version-list", 0); { versionList.Anchor = AnchorType.Fill; versionList.RawSize = new Vector2(-64f, 0f); versionList.SetOffsetVertical(0f); versionList.Background.Alpha = 0f; versionList.UseMask = false; versionList.IsVertical = false; versionList.Initialize(CreateVersionCell, SetupVersionCell); versionList.Axis = GridLayoutGroup.Axis.Horizontal; versionList.CellSize = new Vector2(64f, 64f); } } // Call after a frame due to unity ui limitations. InvokeAfterFrames(1, OnEnableInited); }