Esempio n. 1
0
 /// <summary>
 /// 移出所有资源
 /// </summary>
 /// <returns></returns>
 public static void RemoveAllSource()
 {
     foreach (LoadSourceEntity entity in FindValues <LCSManageSource>())
     {
         LCSUnloadSource.UnLoadSource(entity.Bundle);
     }
     Remove <LCSManageSource>();
 }
Esempio n. 2
0
        /// <summary>
        /// 移出单个资源
        /// </summary>
        /// <param name="resName">资源名字</param>
        /// <returns></returns>
        public static bool RemoveSource(string resName)
        {
            if (string.IsNullOrEmpty(resName))
            {
                LCSConsole.WriteError("移出的资源名字为空!,resName = " + resName);
                return(false);
            }
            LoadSourceEntity entity;

            if (!TryFind <LCSManageSource>(resName, out entity))
            {
                LCSConsole.WriteError("移出的资源不存在!,resName = " + resName);
                return(false);
            }
            LCSUnloadSource.UnLoadSource(entity.Bundle);
            Remove <LCSManageSource>(resName);
            return(true);
        }