コード例 #1
0
ファイル: ABRelativeM.cs プロジェクト: unityHUI/UnityFrame
 //释放资源
 public void Dispose()
 {
     if (abLoader != null)
     {
         abLoader.Dispose();
     }
 }
コード例 #2
0
 void Update()
 {
     if (texturesLoader != null)
     {
         if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha1))
         {
             Debug.Log("Unloads unused textures in the bundle");
             texturesLoader.DisposeUnused();
         }
         else if (Input.GetKey(KeyCode.D) && Input.GetKeyDown(KeyCode.Alpha1))
         {
             Debug.Log("Unloads all textures in the bundle");
             texturesLoader.Dispose();
         }
     }
     if (materialsLoader != null)
     {
         if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha2))
         {
             Debug.Log("Unloads unused materials in the bundle");
             materialsLoader.DisposeUnused();
         }
         else if (Input.GetKey(KeyCode.D) && Input.GetKeyDown(KeyCode.Alpha2))
         {
             Debug.Log("Unloads all materials in the bundle");
             materialsLoader.Dispose();
         }
     }
     if (prefabsLoader != null)
     {
         if (Input.GetKey(KeyCode.U) && Input.GetKeyDown(KeyCode.Alpha3))
         {
             Debug.Log("Unloads unused prefabs in the bundle");
             prefabsLoader.DisposeUnused();
         }
         else if (Input.GetKey(KeyCode.D) && Input.GetKeyDown(KeyCode.Alpha3))
         {
             Debug.Log("Unloads all prefabs in the bundle");
             prefabsLoader.Dispose();
         }
     }
 }
コード例 #3
0
 public void Dispose()
 {
     assetLoader.Dispose();
 }