Esempio n. 1
0
 private void OnDestroy()
 {
     if (mResLoader != null)
     {
         mResLoader.ReleaseAll();
         mResLoader = null;
     }
 }
Esempio n. 2
0
        private IEnumerator Start()
        {
            yield return(new WaitForSeconds(5));

            mResLoader.LoadSync <Texture2D>("resources://pic1");

            yield return(new WaitForSeconds(2));

            Debug.Log("Start load:" + Time.time);
            mResLoader.LoadAsync <AudioClip>("resources://getcoin", callback =>
            {
                Debug.Log(callback.name);

                Debug.Log("end load:" + Time.time);
            });

            yield return(new WaitForSeconds(2));

            mResLoader.LoadSync <AudioClip>("resources://home");

            yield return(new WaitForSeconds(2));

            mResLoader.LoadSync <AudioClip>("resources://Audio/getcoin");

            yield return(new WaitForSeconds(3));

            var homePanelPrefab = mResLoader.LoadSync <GameObject>("resources://HomePanel");

            yield return(new WaitForSeconds(3));

            mResLoader.ReleaseAll();

            Debug.Log(homePanelPrefab == null);
        }
Esempio n. 3
0
        protected override void OnReleaseRes()
        {
            if (AssetBundle != null)
            {
                AssetBundle.Unload(true);
                AssetBundle = null;

                mResLoader.ReleaseAll();
                mResLoader = null;
            }

            ResMgr.Instance.SharedLoadedReses.Remove(this);
        }
Esempio n. 4
0
        protected override void OnReleaseRes()
        {
            if (Asset is GameObject)
            {
            }
            else
            {
                Resources.UnloadAsset(Asset);
            }

            Asset = null;

            mResLoader.ReleaseAll();
            mResLoader = null;

            ResMgr.Instance.SharedLoadedReses.Remove(this);
        }
Esempio n. 5
0
 void OnDestroy()
 {
     mResLoader.ReleaseAll();
     mResLoader = null;
 }
Esempio n. 6
0
 private void OnDestroy()
 {
     mBundle = null;
     mResLoader.ReleaseAll();
     mResLoader = null;
 }