Exemplo n.º 1
0
    public void PreloadAtlases(List <tmResourceCollectionLink> _links)
    {
        List <tmResourceCollectionLink> platformCollectionLinks = tmUtility.GetAllResourceLinksFor(tmSettings.Instance.CurrentPlatform, _links);

        for (int i = 0; i < platformCollectionLinks.Count; ++i)
        {
            platformCollectionLinks[i].collection.LoadTexture();
            CustomDebug.LogFormat("Texture preload for {0}", platformCollectionLinks[i].collection.name);
        }
    }
Exemplo n.º 2
0
    protected override void Awake()
    {
        base.Awake();

        #if UNITY_EDITOR
        if (Application.isPlaying)
        #endif
        {
            if (tmSettings.Instance.isAtlasesPreloadEnabled)
            {
                List <tmResourceCollectionLink> platformCollectionLinks = tmUtility.GetAllResourceLinks(tmSettings.Instance.CurrentPlatform);

                for (int i = 0; i < platformCollectionLinks.Count; ++i)
                {
                    platformCollectionLinks[i].collection.LoadTexture();
                    CustomDebug.LogFormat("Texture preload for {0}", platformCollectionLinks[i].collection.name);
                }
            }
        }
    }