private static void RecoveryGameObjectRef(GameObjectRef gameObjectRef)
 {
     if (gameObjectRef == null)
     {
         return;
     }
     if (gameObjectRef.obj != null)
     {
         GameObject.Destroy(gameObjectRef.obj);
         ReferenceObject.ReleaseObject(gameObjectRef.assetName);
     }
     Debug.Log("gameObejct Destory " + gameObjectRef.assetName);
     gameObjectRef.Clear();
     _freeGameObjectRef.Add(gameObjectRef);
 }
 public void Clear()
 {
     if (asset != null)
     {
         ReferenceObject.ReleaseObject(assetName);
         asset = null;
     }
     if (assetBundle != null)
     {
         ReferenceBundle.ReleaseBundle(bundleName);
         assetBundle = null;
     }
     step        = LoadAssetStep.None;
     bundleName  = null;
     requestId   = 0;
     request     = null;
     assetName   = null;
     onLoadAsset = null;
 }
 private static void RecoveryGameObjectRef(GameObjectRef gameObjectRef)
 {
     if (gameObjectRef == null)
     {
         return;
     }
     if (gameObjectRef.obj != null)
     {
         GameObject.Destroy(gameObjectRef.obj);
         ReferenceObject.ReleaseObject(gameObjectRef.assetName);
     }
     if (ResourceManager.isLog)
     {
         Debug.Log("gameObejct Destory " + gameObjectRef.assetName);
     }
     if (_gameObjectRef.ContainsKey(gameObjectRef.instanceId))
     {
         _gameObjectRef.Remove(gameObjectRef.instanceId);
     }
     gameObjectRef.Clear();
     _freeGameObjectRef.Add(gameObjectRef);
 }
Exemple #4
0
 public static void DestoryAsset(string assetName)
 {
     ReferenceObject.ReleaseObject(assetName);
 }