Beispiel #1
0
        // Start is called before the first frame update
        void Start()
        {
            for (int i = 0; i < assetPaths.Count; i++)
            {
                assetPaths[i].id = i + 1;
                Summon.Contract(assetPaths[i].path, assetPaths[i].type);
            }

            foreach (var assetPath in assetPaths)
            {
                var instantiate = Instantiate(prefab, scrollRect.content.transform, false);
                Summon.Call <Sprite>(assetPath.id, (sprite) => instantiate.sprite = sprite);
            }
        }