Ejemplo n.º 1
0
 void Update()
 {
     UpdateCount++;
     if (load && AssetBundleHelper.EnableUseRes())
     {
         load = !load;
         AssetBundleHelper.PushResToNeedLoad(TestLoadName1, (o) => Debug.Log(o.name));
         var go = AssetBundleHelper.LoadResource_Sync <GameObject>(TestLoadName1);
         go = Instantiate(go);
         go.transform.parent = this.transform;
         //AssetBundleHelper.PushResToNeedLoad(TestLoadName2, (o) => Debug.Log(o.name));
         //AssetBundleHelper.PushResToNeedLoad(TestLoadName3, (o) => Debug.Log(o.name));
         //          StartCoroutine(AssetBundleHelper.LoadResourceAsyn(TestLoadName1, (o)=>Debug.Log(o.name)));
         //          StartCoroutine(AssetBundleHelper.LoadResourceAsyn(TestLoadName2, (o)=>Debug.Log(o.name)));
         //          StartCoroutine(AssetBundleHelper.LoadResourceAsyn(TestLoadName3, (o) => Debug.Log(o.name)));
     }
 }