Browse Source

删除无用代码

大爷 2 years ago
parent
commit
ff84d6001e
27 changed files with 0 additions and 1026 deletions
  1. 0 8
      Unity/Assets/Scripts/Codes/Model/Share/Module/Move.meta
  2. 0 8
      Unity/Assets/Scripts/Codes/Model/Share/Module/Numeric.meta
  3. 0 8
      Unity/Assets/Scripts/Codes/Model/Share/Module/Recast.meta
  4. 0 8
      Unity/Assets/Scripts/Codes/Model/Share/Module/Unit.meta
  5. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/BattleRes.meta
  6. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/FGUIGenerate.meta
  7. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/Module.meta
  8. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource.meta
  9. 0 585
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesComponent.cs
  10. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesComponent.cs.meta
  11. 0 73
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesLoaderComponent.cs
  12. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesLoaderComponent.cs.meta
  13. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI.meta
  14. 0 8
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/AUIEvent.cs
  15. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/AUIEvent.cs.meta
  16. 0 44
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/LayerNames.cs
  17. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/LayerNames.cs.meta
  18. 0 84
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UI.cs
  19. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UI.cs.meta
  20. 0 13
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIComponent.cs
  21. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIComponent.cs.meta
  22. 0 14
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventAttribute.cs
  23. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventAttribute.cs.meta
  24. 0 20
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventComponent.cs
  25. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventComponent.cs.meta
  26. 0 14
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIType.cs
  27. 0 11
      Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIType.cs.meta

+ 0 - 8
Unity/Assets/Scripts/Codes/Model/Share/Module/Move.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 26fd94c36353aad4591969119ce93bb4
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/Model/Share/Module/Numeric.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 3d6a99783c189d543ac801a2d36b362b
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/Model/Share/Module/Recast.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 50e2749056f46c0489ebe1e199d3a108
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/Model/Share/Module/Unit.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 974f5651ee87bd6429abdd765e594762
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/BattleRes.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 6e8015a68db345d4e8a9227d0f98dc8e
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/FGUIGenerate.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 0e3074a14b1feb34b8998a5b46030e74
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/Module.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: ffdd1cc7fd912e644aa1f2a2721b303a
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 616bed0159a236645ab0d4efafce935d
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 585
Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesComponent.cs

@@ -1,585 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using UnityEngine;
-
-namespace ET.Client
-{
-    [FriendOf(typeof(ABInfo))]
-    public static class ABInfoSystem
-    {
-        [ObjectSystem]
-        public class ABInfoAwakeSystem: AwakeSystem<ABInfo, string, AssetBundle>
-        {
-            protected override void Awake(ABInfo self, string abName, AssetBundle a)
-            {
-                self.AssetBundle = a;
-                self.Name = abName;
-                self.RefCount = 1;
-                self.AlreadyLoadAssets = false;
-            }
-        }
-
-        [ObjectSystem]
-        public class ABInfoDestroySystem: DestroySystem<ABInfo>
-        {
-            protected override void Destroy(ABInfo self)
-            {
-                //Log.Debug($"desdroy assetbundle: {self.Name}");
-
-                self.RefCount = 0;
-                self.Name = "";
-                self.AlreadyLoadAssets = false;
-                self.AssetBundle = null;
-            }
-        }
-        
-        public static void Destroy(this ABInfo self, bool unload = true)
-        {
-            if (self.AssetBundle != null)
-            {
-                self.AssetBundle.Unload(unload);
-            }
-
-            self.Dispose();
-        }
-    }
-
-    [ChildOf(typeof(ResourcesComponent))]
-    public class ABInfo: Entity, IAwake<string, AssetBundle>, IDestroy
-    {
-        public string Name { get; set; }
-
-        public int RefCount { get; set; }
-
-        public AssetBundle AssetBundle;
-
-        public bool AlreadyLoadAssets;
-    }
-
-    // 用于字符串转换,减少GC
-    [FriendOf(typeof(ResourcesComponent))]
-    public static class AssetBundleHelper
-    {
-        public static string IntToString(this int value)
-        {
-            string result;
-            if (ResourcesComponent.Instance.IntToStringDict.TryGetValue(value, out result))
-            {
-                return result;
-            }
-
-            result = value.ToString();
-            ResourcesComponent.Instance.IntToStringDict[value] = result;
-            return result;
-        }
-
-        public static string StringToAB(this string value)
-        {
-            string result;
-            if (ResourcesComponent.Instance.StringToABDict.TryGetValue(value, out result))
-            {
-                return result;
-            }
-
-            result = value + ".unity3d";
-            ResourcesComponent.Instance.StringToABDict[value] = result;
-            return result;
-        }
-
-        public static string IntToAB(this int value)
-        {
-            return value.IntToString().StringToAB();
-        }
-
-        public static string BundleNameToLower(this string value)
-        {
-            string result;
-            if (ResourcesComponent.Instance.BundleNameToLowerDict.TryGetValue(value, out result))
-            {
-                return result;
-            }
-
-            result = value.ToLower();
-            ResourcesComponent.Instance.BundleNameToLowerDict[value] = result;
-            return result;
-        }
-    }
-
-
-
-    [FriendOf(typeof(ABInfo))]
-    [FriendOf(typeof(ResourcesComponent))]
-    public static class ResourcesComponentSystem
-    {
-        [ObjectSystem]
-        public class ResourcesComponentAwakeSystem: AwakeSystem<ResourcesComponent>
-        {
-            protected override void Awake(ResourcesComponent self)
-            {
-                ResourcesComponent.Instance = self;
-                if (Define.IsAsync)
-                {
-                    self.LoadOneBundle("StreamingAssets");
-                    self.AssetBundleManifestObject = (AssetBundleManifest)self.GetAsset("StreamingAssets", "AssetBundleManifest");
-                    self.UnloadBundle("StreamingAssets", false);
-                }
-            }
-        }
-        
-        [ObjectSystem]
-        public class ResourcesComponentDestroySystem: DestroySystem<ResourcesComponent>
-        {
-            protected override void Destroy(ResourcesComponent self)
-            {
-                ResourcesComponent.Instance = null;
-
-                foreach (var abInfo in self.bundles)
-                {
-                    abInfo.Value.Destroy();
-                }
-
-                self.bundles.Clear();
-                self.resourceCache.Clear();
-                self.IntToStringDict.Clear();
-                self.StringToABDict.Clear();
-                self.BundleNameToLowerDict.Clear();
-                if (self.AssetBundleManifestObject != null)
-                {
-                    UnityEngine.Object.Destroy(self.AssetBundleManifestObject);
-                    self.AssetBundleManifestObject = null;
-                }
-            }
-        }
-
-        private static string[] GetDependencies(this ResourcesComponent self, string assetBundleName)
-        {
-            string[] dependencies = Array.Empty<string>();
-            if (self.DependenciesCache.TryGetValue(assetBundleName, out dependencies))
-            {
-                return dependencies;
-            }
-
-            if (!Define.IsAsync)
-            {
-                if (Define.IsEditor)
-                {
-                    dependencies = Define.GetAssetBundleDependencies(assetBundleName, true);
-                }
-            }
-            else
-            {
-                dependencies = self.AssetBundleManifestObject.GetAllDependencies(assetBundleName);
-            }
-
-            self.DependenciesCache.Add(assetBundleName, dependencies);
-            return dependencies;
-        }
-
-        private static string[] GetSortedDependencies(this ResourcesComponent self, string assetBundleName)
-        {
-            var info = new Dictionary<string, int>();
-            var parents = new List<string>();
-            self.CollectDependencies(parents, assetBundleName, info);
-            string[] ss = info.OrderBy(x => x.Value).Select(x => x.Key).ToArray();
-            return ss;
-        }
-
-        private static void CollectDependencies(this ResourcesComponent self, List<string> parents, string assetBundleName, Dictionary<string, int> info)
-        {
-            parents.Add(assetBundleName);
-            string[] deps = self.GetDependencies(assetBundleName);
-            foreach (string parent in parents)
-            {
-                if (!info.ContainsKey(parent))
-                {
-                    info[parent] = 0;
-                }
-
-                info[parent] += deps.Length;
-            }
-
-            foreach (string dep in deps)
-            {
-                if (parents.Contains(dep))
-                {
-                    throw new Exception($"包有循环依赖,请重新标记: {assetBundleName} {dep}");
-                }
-
-                self.CollectDependencies(parents, dep, info);
-            }
-
-            parents.RemoveAt(parents.Count - 1);
-        }
-
-
-
-        public static bool Contains(this ResourcesComponent self, string bundleName)
-        {
-            return self.bundles.ContainsKey(bundleName);
-        }
-
-        public static UnityEngine.Object GetAsset(this ResourcesComponent self, string bundleName, string prefab)
-        {
-            Dictionary<string, UnityEngine.Object> dict;
-            if (!self.resourceCache.TryGetValue(bundleName.BundleNameToLower(), out dict))
-            {
-                throw new Exception($"not found asset: {bundleName} {prefab}");
-            }
-
-            UnityEngine.Object resource = null;
-            if (!dict.TryGetValue(prefab, out resource))
-            {
-                throw new Exception($"not found asset: {bundleName} {prefab}");
-            }
-
-            return resource;
-        }
-
-        // 一帧卸载一个包,避免卡死
-        public static async ETTask UnloadBundleAsync(this ResourcesComponent self, string assetBundleName, bool unload = true)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-
-            string[] dependencies = self.GetSortedDependencies(assetBundleName);
-
-            //Log.Debug($"-----------dep unload start {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-            foreach (string dependency in dependencies)
-            {
-                using (await CoroutineLockComponent.Instance.Wait(CoroutineLockType.Resources, assetBundleName.GetHashCode()))
-                {
-                    self.UnloadOneBundle(dependency, unload);
-                    await TimerComponent.Instance.WaitFrameAsync();
-                }
-            }
-            //Log.Debug($"-----------dep unload finish {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-        }
-
-        // 只允许场景设置unload为false
-        public static void UnloadBundle(this ResourcesComponent self, string assetBundleName, bool unload = true)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-
-            string[] dependencies = self.GetSortedDependencies(assetBundleName);
-
-            //Log.Debug($"-----------dep unload start {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-            foreach (string dependency in dependencies)
-            {
-                self.UnloadOneBundle(dependency, unload);
-            }
-
-            //Log.Debug($"-----------dep unload finish {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-        }
-
-        private static void UnloadOneBundle(this ResourcesComponent self, string assetBundleName, bool unload = true)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-
-            ABInfo abInfo;
-            if (!self.bundles.TryGetValue(assetBundleName, out abInfo))
-            {
-                return;
-            }
-
-            //Log.Debug($"---------------unload one bundle {assetBundleName} refcount: {abInfo.RefCount - 1}");
-
-            --abInfo.RefCount;
-
-            if (abInfo.RefCount > 0)
-            {
-                return;
-            }
-
-            //Log.Debug($"---------------truly unload one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-            self.bundles.Remove(assetBundleName);
-            self.resourceCache.Remove(assetBundleName);
-            abInfo.Destroy(unload);
-            // Log.Debug($"cache count: {self.cacheDictionary.Count}");
-        }
-
-        /// <summary>
-        /// 同步加载assetbundle
-        /// </summary>
-        /// <param name="assetBundleName"></param>
-        /// <returns></returns>
-        public static void LoadBundle(this ResourcesComponent self, string assetBundleName)
-        {
-            assetBundleName = assetBundleName.ToLower();
-
-            string[] dependencies = self.GetSortedDependencies(assetBundleName);
-            //Log.Debug($"-----------dep load start {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-            foreach (string dependency in dependencies)
-            {
-                if (string.IsNullOrEmpty(dependency))
-                {
-                    continue;
-                }
-
-                self.LoadOneBundle(dependency);
-            }
-
-            //Log.Debug($"-----------dep load finish {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-        }
-
-        private static void AddResource(this ResourcesComponent self, string bundleName, string assetName, UnityEngine.Object resource)
-        {
-            Dictionary<string, UnityEngine.Object> dict;
-            if (!self.resourceCache.TryGetValue(bundleName.BundleNameToLower(), out dict))
-            {
-                dict = new Dictionary<string, UnityEngine.Object>();
-                self.resourceCache[bundleName] = dict;
-            }
-
-            dict[assetName] = resource;
-        }
-
-        private static void LoadOneBundle(this ResourcesComponent self, string assetBundleName)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-            ABInfo abInfo;
-            if (self.bundles.TryGetValue(assetBundleName, out abInfo))
-            {
-                ++abInfo.RefCount;
-                //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-                return;
-            }
-
-            if (!Define.IsAsync)
-            {
-                if (Define.IsEditor)
-                {
-                    string[] realPath = null;
-                    realPath = Define.GetAssetPathsFromAssetBundle(assetBundleName);
-                    foreach (string s in realPath)
-                    {
-                        string assetName = Path.GetFileNameWithoutExtension(s);
-                        UnityEngine.Object resource = Define.LoadAssetAtPath(s);
-                        self.AddResource(assetBundleName, assetName, resource);
-                    }
-
-                    if (realPath.Length > 0)
-                    {
-                        abInfo = self.AddChild<ABInfo, string, AssetBundle>(assetBundleName, null);
-                        self.bundles[assetBundleName] = abInfo;
-                        //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-                    }
-                    else
-                    {
-                        Log.Error($"assets bundle not found: {assetBundleName}");
-                    }
-                }
-
-                return;
-            }
-
-            string p = Path.Combine(PathHelper.AppHotfixResPath, assetBundleName);
-            AssetBundle assetBundle = null;
-            if (File.Exists(p))
-            {
-                assetBundle = AssetBundle.LoadFromFile(p);
-            }
-            else
-            {
-                p = Path.Combine(PathHelper.AppResPath, assetBundleName);
-                assetBundle = AssetBundle.LoadFromFile(p);
-            }
-
-            if (assetBundle == null)
-            {
-                // 获取资源的时候会抛异常,这个地方不直接抛异常,因为有些地方需要Load之后判断是否Load成功
-                Log.Warning($"assets bundle not found: {assetBundleName}");
-                return;
-            }
-
-            if (!assetBundle.isStreamedSceneAssetBundle)
-            {
-                // 异步load资源到内存cache住
-                var assets = assetBundle.LoadAllAssets();
-                foreach (UnityEngine.Object asset in assets)
-                {
-                    self.AddResource(assetBundleName, asset.name, asset);
-                }
-            }
-
-            abInfo = self.AddChild<ABInfo, string, AssetBundle>(assetBundleName, assetBundle);
-            self.bundles[assetBundleName] = abInfo;
-
-            //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-        }
-
-        /// <summary>
-        /// 异步加载assetbundle, 加载ab包分两部分,第一部分是从硬盘加载,第二部分加载all assets。两者不能同时并发
-        /// </summary>
-        public static async ETTask LoadBundleAsync(this ResourcesComponent self, string assetBundleName)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-
-            string[] dependencies = self.GetSortedDependencies(assetBundleName);
-            //Log.Debug($"-----------dep load async start {assetBundleName} dep: {dependencies.ToList().ListToString()}");
-
-            using (ListComponent<ABInfo> abInfos = ListComponent<ABInfo>.Create())
-            {
-                async ETTask LoadDependency(string dependency, List<ABInfo> abInfosList)
-                {
-                    using CoroutineLock coroutineLock = await CoroutineLockComponent.Instance.Wait(CoroutineLockType.Resources, dependency.GetHashCode());
-                    
-                    ABInfo abInfo = await self.LoadOneBundleAsync(dependency);
-                    if (abInfo == null || abInfo.RefCount > 1)
-                    {
-                        return;
-                    }
-
-                    abInfosList.Add(abInfo);
-                }
-
-                // LoadFromFileAsync部分可以并发加载
-                using (ListComponent<ETTask> tasks = ListComponent<ETTask>.Create())
-                {
-                    foreach (string dependency in dependencies)
-                    {
-                        tasks.Add(LoadDependency(dependency, abInfos));
-                    }
-                    await ETTaskHelper.WaitAll(tasks);
-
-                    // ab包从硬盘加载完成,可以再并发加载all assets
-                    tasks.Clear();
-                    foreach (ABInfo abInfo in abInfos)
-                    {
-                        tasks.Add(self.LoadOneBundleAllAssets(abInfo));
-                    }
-                    await ETTaskHelper.WaitAll(tasks);
-                }
-            }
-        }
-
-        private static async ETTask<ABInfo> LoadOneBundleAsync(this ResourcesComponent self, string assetBundleName)
-        {
-            assetBundleName = assetBundleName.BundleNameToLower();
-            ABInfo abInfo;
-            if (self.bundles.TryGetValue(assetBundleName, out abInfo))
-            {
-                ++abInfo.RefCount;
-                //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-                return null;
-            }
-            string p = "";
-            AssetBundle assetBundle = null;
-
-            if (!Define.IsAsync)
-            {
-                if (Define.IsEditor)
-                {
-                    string[] realPath = Define.GetAssetPathsFromAssetBundle(assetBundleName);
-                    foreach (string s in realPath)
-                    {
-                        string assetName = Path.GetFileNameWithoutExtension(s);
-                        UnityEngine.Object resource = Define.LoadAssetAtPath(s);
-                        self.AddResource(assetBundleName, assetName, resource);
-                    }
-
-                    if (realPath.Length > 0)
-                    {
-                        abInfo = self.AddChild<ABInfo, string, AssetBundle>(assetBundleName, null);
-                        self.bundles[assetBundleName] = abInfo;
-                        //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-                    }
-                    else
-                    {
-                        Log.Error("Bundle not exist! BundleName: " + assetBundleName);
-                    }
-
-                    // 编辑器模式也不能同步加载
-                    await TimerComponent.Instance.WaitAsync(100);
-
-                    return abInfo;
-                }
-            }
-            p = Path.Combine(PathHelper.AppHotfixResPath, assetBundleName);
-            if (!File.Exists(p))
-            {
-                p = Path.Combine(PathHelper.AppResPath, assetBundleName);
-            }
-            Log.Debug("Async load bundle BundleName : " + p);
-
-            // if (!File.Exists(p))
-            // {
-            //     Log.Error("Async load bundle not exist! BundleName : " + p);
-            //     return null;
-            // }
-            AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.LoadFromFileAsync(p);
-            await assetBundleCreateRequest;
-            assetBundle = assetBundleCreateRequest.assetBundle;
-            if (assetBundle == null)
-            {
-                // 获取资源的时候会抛异常,这个地方不直接抛异常,因为有些地方需要Load之后判断是否Load成功
-                Log.Warning($"assets bundle not found: {assetBundleName}");
-                return null;
-            }
-            abInfo = self.AddChild<ABInfo, string, AssetBundle>(assetBundleName, assetBundle);
-            self.bundles[assetBundleName] = abInfo;
-            return abInfo;
-            //Log.Debug($"---------------load one bundle {assetBundleName} refcount: {abInfo.RefCount}");
-        }
-
-        // 加载ab包中的all assets
-        private static async ETTask LoadOneBundleAllAssets(this ResourcesComponent self, ABInfo abInfo)
-        {
-            using CoroutineLock coroutineLock = await CoroutineLockComponent.Instance.Wait(CoroutineLockType.Resources, abInfo.Name.GetHashCode());
-            
-            if (abInfo.IsDisposed || abInfo.AlreadyLoadAssets)
-            {
-                return;
-            }
-
-            if (abInfo.AssetBundle != null && !abInfo.AssetBundle.isStreamedSceneAssetBundle)
-            {
-                // 异步load资源到内存cache住
-                AssetBundleRequest request = abInfo.AssetBundle.LoadAllAssetsAsync();
-                await request;
-                UnityEngine.Object[] assets = request.allAssets;
-
-                foreach (UnityEngine.Object asset in assets)
-                {
-                    self.AddResource(abInfo.Name, asset.name, asset);
-                }
-            }
-
-            abInfo.AlreadyLoadAssets = true;
-        }
-
-        public static string DebugString(this ResourcesComponent self)
-        {
-            StringBuilder sb = new StringBuilder();
-            foreach (ABInfo abInfo in self.bundles.Values)
-            {
-                sb.Append($"{abInfo.Name}:{abInfo.RefCount}\n");
-            }
-
-            return sb.ToString();
-        }
-    }
-    
-    [ComponentOf]
-    public class ResourcesComponent: Entity, IAwake, IDestroy
-    {
-        public static ResourcesComponent Instance { get; set; }
-
-        public AssetBundleManifest AssetBundleManifestObject { get; set; }
-
-        public Dictionary<int, string> IntToStringDict = new Dictionary<int, string>();
-
-        public Dictionary<string, string> StringToABDict = new Dictionary<string, string>();
-
-        public Dictionary<string, string> BundleNameToLowerDict = new Dictionary<string, string>() { { "StreamingAssets", "StreamingAssets" } };
-
-        public readonly Dictionary<string, Dictionary<string, UnityEngine.Object>> resourceCache =
-                new Dictionary<string, Dictionary<string, UnityEngine.Object>>();
-
-        public readonly Dictionary<string, ABInfo> bundles = new Dictionary<string, ABInfo>();
-        
-        // 缓存包依赖,不用每次计算
-        public readonly Dictionary<string, string[]> DependenciesCache = new Dictionary<string, string[]>();
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesComponent.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2cb0877ce39c01149ae9757987d6c072
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 73
Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesLoaderComponent.cs

@@ -1,73 +0,0 @@
-using System.Collections.Generic;
-
-namespace ET.Client
-{
-    [FriendOf(typeof(ResourcesLoaderComponent))]
-    public static class ResourcesLoaderComponentSystem
-    {
-        [ObjectSystem]
-            public class ResourcesLoaderComponentDestroySystem: DestroySystem<ResourcesLoaderComponent>
-            {
-                protected override void Destroy(ResourcesLoaderComponent self)
-                {
-                    async ETTask UnLoadAsync()
-                    {
-                        using (ListComponent<string> list = ListComponent<string>.Create())
-                        {
-                            list.AddRange(self.LoadedResource);
-                            self.LoadedResource = null;
-        
-                            if (TimerComponent.Instance == null)
-                            {
-                                return;
-                            }
-                            
-                            // 延迟5秒卸载包,因为包卸载是引用计数,5秒之内假如重新有逻辑加载了这个包,那么可以避免一次卸载跟加载
-                            await TimerComponent.Instance.WaitAsync(5000);
-        
-                            foreach (string abName in list)
-                            {
-                                using CoroutineLock coroutineLock =
-                                        await CoroutineLockComponent.Instance.Wait(CoroutineLockType.ResourcesLoader, abName.GetHashCode(), 0);
-                                {
-                                    if (ResourcesComponent.Instance == null)
-                                    {
-                                        return;
-                                    }
-        
-                                    await ResourcesComponent.Instance.UnloadBundleAsync(abName);
-                                }
-                            }
-                        }
-                    }
-        
-                    UnLoadAsync().Coroutine();
-                }
-            }
-        
-        public static async ETTask LoadAsync(this ResourcesLoaderComponent self, string ab)
-        {
-            using CoroutineLock coroutineLock = await CoroutineLockComponent.Instance.Wait(CoroutineLockType.ResourcesLoader, ab.GetHashCode(), 0);
-                    
-            if (self.IsDisposed)
-            {
-                Log.Error($"resourceload already disposed {ab}");
-                return;
-            }
-
-            if (self.LoadedResource.Contains(ab))
-            {
-                return;
-            }
-
-            self.LoadedResource.Add(ab);
-            await ResourcesComponent.Instance.LoadBundleAsync(ab);
-        }
-    }
-    
-    [ComponentOf(typeof(Scene))]
-    public class ResourcesLoaderComponent: Entity, IAwake, IDestroy
-    {
-        public HashSet<string> LoadedResource = new HashSet<string>();
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/Resource/ResourcesLoaderComponent.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f58c0f8670b2991469fa8baf32c0477b
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: e856c423a1f6fc94ba8601e52423851d
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/AUIEvent.cs

@@ -1,8 +0,0 @@
-namespace ET.Client
-{
-    public abstract class AUIEvent
-    {
-        public abstract ETTask<UI> OnCreate(UIComponent uiComponent, UILayer uiLayer);
-        public abstract void OnRemove(UIComponent uiComponent);
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/AUIEvent.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: f6f2376fee49a244889f2068ef220f29
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 44
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/LayerNames.cs

@@ -1,44 +0,0 @@
-using UnityEngine;
-
-namespace ET.Client
-{
-	public static class LayerNames
-	{
-		/// <summary>
-		/// UI层
-		/// </summary>
-		public const string UI = "UI";
-
-		/// <summary>
-		/// 游戏单位层
-		/// </summary>
-		public const string UNIT = "Unit";
-
-		/// <summary>
-		/// 地形层
-		/// </summary>
-		public const string MAP = "Map";
-
-		/// <summary>
-		/// 默认层
-		/// </summary>
-		public const string DEFAULT = "Default";
-		
-		public const string HIDDEN = "Hidden";
-
-		/// <summary>
-		/// 通过Layers名字得到对应层
-		/// </summary>
-		/// <param name="name"></param>
-		/// <returns></returns>
-		public static int GetLayerInt(string name)
-		{
-			return LayerMask.NameToLayer(name);
-		}
-
-		public static string GetLayerStr(int name)
-		{
-			return LayerMask.LayerToName(name);
-		}
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/LayerNames.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 37bb248382482ee4ea59a515562009a0
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 84
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UI.cs

@@ -1,84 +0,0 @@
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace ET.Client
-{
-    [FriendOf(typeof(UI))]
-    public static class UISystem
-    {
-        [ObjectSystem]
-        public class UIAwakeSystem : AwakeSystem<UI, string, GameObject>
-        {
-            protected override void Awake(UI self, string name, GameObject gameObject)
-            {
-                self.nameChildren.Clear();
-                gameObject.layer = LayerMask.NameToLayer(LayerNames.UI);
-                self.Name = name;
-                self.GameObject = gameObject;
-            }
-        }
-		
-        [ObjectSystem]
-        public class UIDestroySystem : DestroySystem<UI>
-        {
-            protected override void Destroy(UI self)
-            {
-                foreach (UI ui in self.nameChildren.Values)
-                {
-                    ui.Dispose();
-                }
-			
-                UnityEngine.Object.Destroy(self.GameObject);
-                self.nameChildren.Clear();
-            }
-        }
-
-        public static void SetAsFirstSibling(this UI self)
-        {
-            self.GameObject.transform.SetAsFirstSibling();
-        }
-
-        public static void Add(this UI self, UI ui)
-        {
-            self.nameChildren.Add(ui.Name, ui);
-        }
-
-        public static void Remove(this UI self, string name)
-        {
-            UI ui;
-            if (!self.nameChildren.TryGetValue(name, out ui))
-            {
-                return;
-            }
-            self.nameChildren.Remove(name);
-            ui.Dispose();
-        }
-
-        public static UI Get(this UI self, string name)
-        {
-            UI child;
-            if (self.nameChildren.TryGetValue(name, out child))
-            {
-                return child;
-            }
-            GameObject childGameObject = self.GameObject.transform.Find(name)?.gameObject;
-            if (childGameObject == null)
-            {
-                return null;
-            }
-            child = self.AddChild<UI, string, GameObject>(name, childGameObject);
-            self.Add(child);
-            return child;
-        }
-    }
-    
-    [ChildOf()]
-    public sealed class UI: Entity, IAwake<string, GameObject>, IDestroy
-    {
-        public GameObject GameObject { get; set; }
-		
-        public string Name { get; set; }
-
-        public Dictionary<string, UI> nameChildren = new Dictionary<string, UI>();
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UI.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2246148a90d4eaa43922afece421cb89
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 13
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIComponent.cs

@@ -1,13 +0,0 @@
-using System.Collections.Generic;
-
-namespace ET.Client
-{
-	/// <summary>
-	/// 管理Scene上的UI
-	/// </summary>
-	[ComponentOf(typeof(Scene))]
-	public class UIComponent: Entity, IAwake
-	{
-		public Dictionary<string, UI> UIs = new Dictionary<string, UI>();
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIComponent.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 871912424dfff414b83ffac903b92716
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 14
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventAttribute.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace ET.Client
-{
-    public class UIEventAttribute: BaseAttribute
-    {
-        public string UIType { get; }
-
-        public UIEventAttribute(string uiType)
-        {
-            this.UIType = uiType;
-        }
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventAttribute.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3c0044aad52c61e46b039b3fb18d4cfd
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 20
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventComponent.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
-namespace ET.Client
-{
-	/// <summary>
-	/// 管理所有UI GameObject
-	/// </summary>
-	[ComponentOf(typeof(Scene))]
-	public class UIEventComponent: Entity, IAwake
-	{
-		[StaticField]
-		public static UIEventComponent Instance;
-		
-		public Dictionary<string, AUIEvent> UIEvents = new Dictionary<string, AUIEvent>();
-		
-		public Dictionary<int, Transform> UILayers = new Dictionary<int, Transform>();
-	}
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIEventComponent.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 20f5d2b1e85496c4dbaf9730919b3352
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 14
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIType.cs

@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace ET.Client
-{
-    public static class UIType
-    {
-	    public const string Root = "Root";
-	    public const string UILoading = "UILoading";
-	    public const string UILogin = "UILogin";
-	    public const string UILobby = "UILobby";
-	    public const string UIHelp = "UIHelp";
-    }
-}

+ 0 - 11
Unity/Assets/Scripts/Codes/ModelView/Client/Module/UI/UIType.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2c32db14cd4ec094d961cf7fab37be32
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: