Exemplo n.º 1
0
        private void LoadAllObjectsInPath(AssetLoadRequestTO to)
        {
            to.loadObjectList = Resources.LoadAll(to.path);
            HandleAssetLoaded(to);

            if (to.callback != null)
            {
                to.callback(to);
            }

            EventController.GetInstance().FireEvent(EventTypeEnum.AssetLoadComplete, null);
            LoadFinished();
        }
Exemplo n.º 2
0
        private IEnumerator LoadAsync(AssetLoadRequestTO to)
        {
            ResourceRequest req = Resources.LoadAsync(to.path);

            while (!req.isDone)
            {
                Debug.Log("Load Progress: " + req.progress);
                yield return(null);
            }
            to.loadedObject = req.asset;
            HandleAssetLoaded(to);

            if (to.callback != null)
            {
                to.callback(to);
            }

            EventController.GetInstance().FireEvent(EventTypeEnum.AssetLoadComplete, null);
            LoadFinished();
        }