Ejemplo n.º 1
0
        static private async Task LoadManifest()
        {
            string streamingAssetsStr     = "StreamingAssets";
            string assetBundleManifestStr = "AssetBundleManifest";
            WWW    www = new WWW(ResourceURL.GetUrl(streamingAssetsStr));

            await new WaitUntil(() => www.isDone);
            AssetBundle manifestBundle = www.assetBundle;

            mManifest = (AssetBundleManifest)manifestBundle.LoadAsset(assetBundleManifestStr, typeof(AssetBundleManifest));
            manifestBundle.Unload(false);
            www.Dispose();
            //TODO ADD ART WORK SPACE

            WWW www1 = new WWW(ResourceURL.GetExternalUrl(streamingAssetsStr));

            await new WaitUntil(() => www1.isDone);
            AssetBundle manifestBundle1 = www1.assetBundle;

            mExternalManifest = (AssetBundleManifest)manifestBundle1.LoadAsset(assetBundleManifestStr, typeof(AssetBundleManifest));
            manifestBundle1.Unload(false);
            www1.Dispose();
            mCallBackDelegate();
            //  mInitCallback.Call();
            mCallBackDelegate = null;
        }
Ejemplo n.º 2
0
 static public void LoadObjectExternal(string path, string file, CallBackDelegate <object, object> callBack)
 {
     if (AsyncResourceManager.CheckLoaded(ResourceURL.GetExternalPath(path + file)) || AsyncResourceManager.CheckAssetBundleLoaderAsync(ResourceURL.GetExternalPath(path + file)))
     {
         AsyncResourceManager.LoadExternalAsync(path, file, callBack);
         return;
     }
     SyncResourceManager.InternalLoadAsset(path, file, callBack, ResourceURL.GetExternalPath, SyncResourceManager.GetAllDependenciesExternal, SyncResourceManager.LoadExternalGoFunc);
 }
Ejemplo n.º 3
0
        static async public Task Init()
        {
            await LoadManifest(ResourceURL.GetUrl("StreamingAssets"));

            //TODO ADD ART WORK SPACE
            await LoadExternaManifest(ResourceURL.GetExternalUrl("StreamingAssets"));

            return;
        }
Ejemplo n.º 4
0
        public void LoadPersistentAndRaw(string path, Action <WWW> persistentCallBack, Action <WWW> rawCallBack)
        {
            if (ResourceURL.CheckPersistentFileExists(path))
            {
                LoadLocal(ResourceURL.GetPersistentPath(path), persistentCallBack);
            }

            LoadLocal(ResourceURL.GetRawPath(path), rawCallBack);
        }
Ejemplo n.º 5
0
 public int StartLoad()
 {
     if (this.www == null)
     {
         Debug.Log(ResourceURL.GetUrl(this.mPath));
         this.www = new WWW(ResourceURL.GetUrl(this.mPath));
         return(1);
     }
     return(0);
 }
Ejemplo n.º 6
0
 public void PriorLoadPersistent(bool priorLoadPersistent, string path, Action <WWW> callBack)
 {
     if (priorLoadPersistent && ResourceURL.CheckPersistentFileExists(path))
     {
         LoadLocal(ResourceURL.GetPersistentPath(path), callBack);
     }
     else
     {
         LoadLocal(ResourceURL.GetRawPath(path), callBack);
     }
 }
Ejemplo n.º 7
0
 static public void LoadUIFXExternal(string file, CallBackDelegate <object, object> callBack)
 {
     SyncResourceManager.InternalLoadAsset(ResourceURL.GetUIFXPath(""), file, callBack, ResourceURL.GetExternalPath, SyncResourceManager.GetAllDependenciesExternal, SyncResourceManager.LoadUIFxObjectFunc);
 }
Ejemplo n.º 8
0
 static public void LoadRoleExternal(string file, CallBackDelegate <object, object> callBack)
 {
     SyncResourceManager.InternalLoadAsset(ResourceURL.GetModelPath(), file, callBack, ResourceURL.GetExternalPath, SyncResourceManager.GetAllDependenciesExternal, SyncResourceManager.LoadExternalRoleFunc);
 }
Ejemplo n.º 9
0
 static void InternalLoadScene(string file, CallBackDelegate <object, object> callBack, GetPathFunc getPathFunc, GetDependBundlesFunc getDependBundlesFunc, bool exernalScene)
 {
     AssetLoaderManager.Instance.LoadAsset(ResourceURL.GetScenePath(), file, callBack, getPathFunc, getDependBundlesFunc, new LoadFunc(LoadSceneFunc), exernalScene);
 }