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]); } } } }
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); } } }
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); } } }