Exemplo n.º 1
0
        public bool UnLoadRef(string resPath)
        {
            I_ObjectInfo objectInfo = GetAssetInfo(resPath);

            if (objectInfo == null)
            {
                return(false);
            }

            objectInfo.UnRefByPath(resPath);
            return(true);
        }
Exemplo n.º 2
0
        // 卸载指定路径的资源
        public bool UnLoadRes(string resPath)
        {
            I_ObjectInfo objectInfo = GetAssetInfo(resPath);

            if (objectInfo == null)
            {
                return(false);
            }

            objectInfo.UnRefByPath(resPath);
            string path   = objectInfo.Path;
            bool   result = _loader.UnloadAsset(objectInfo);

            if (result)
            {
                _cacheRes.Remove(path);
            }
            ResLog.Assert(result, "卸载失败:[{0}]", path);
            return(result);
        }