Example #1
0
        protected override void OnShow(GUnit unit, PanelData panel, params object[] args)
        {
            var preloadPanelData = panel as UIPreloadTestPanelData;
            var asset            = AssetProcess.Get <GameObject>("Prefabs/UI/PreloadItem");

            for (var i = 0; i < 10; i++)
            {
                var preloadItem = asset.Spawn();
                preloadItem.transform.SetParent(preloadPanelData.grid.transform);
            }
        }