예제 #1
0
 public static void UnloadAsset(Object go, bool releaseAsset = true)
 {
     if (go)
     {
         int guid = go.GetInstanceID();
         if (m_gameObjectNameMapping.ContainsKey(guid))
         {
             if (releaseAsset)
             {
                 m_assetMgr.UnloadAsset(m_gameObjectNameMapping[guid]);
             }
         }
     }
 }
예제 #2
0
 public static void UnloadAsset(UnityEngine.Object go, bool releaseAsset = true)
 {
     if (go != 0)
     {
         int instanceID = go.GetInstanceID();
         if (m_gameObjectNameMapping.ContainsKey(instanceID))
         {
             if (releaseAsset)
             {
                 m_assetMgr.UnloadAsset(m_gameObjectNameMapping[instanceID]);
             }
         }
         else
         {
             LoggerHelper.Warning("go not in mapping: " + go.name, true);
         }
     }
 }
예제 #3
0
 public static void UnloadAsset(Object go, bool releaseAsset = true)
 {
     if (go)
     {
         int guid = go.GetInstanceID();
         if (m_gameObjectNameMapping.ContainsKey(guid))
         {
             if (releaseAsset)
             {
                 m_assetMgr.UnloadAsset(m_gameObjectNameMapping[guid]);
             }
             //m_gameObjectNameMapping.Remove(guid);
         }
         else
         {
             LoggerHelper.Warning("go not in mapping: " + go.name);
         }
     }
 }