Pārlūkot izejas kodu

ENABLE_CODES模式下,Unity.Codes程序集拆分成4个程序集,解决分析器失效的问题

tanghai 3 gadi atpakaļ
vecāks
revīzija
c78f89b500
44 mainītis faili ar 388 papildinājumiem un 121 dzēšanām
  1. 5 0
      .gitignore
  2. 9 3
      Book/1.1运行指南.md
  3. 2 2
      Config/NLog/NLog.config
  4. 85 19
      ET.sln
  5. 39 22
      Share/Analyzer/Config/AnalyzeAssembly.cs
  6. 8 0
      Unity/Assets/Scripts/Codes/Editor.meta
  7. 8 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow.meta
  8. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu.meta
  9. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/AEntityMenuHandler.cs
  10. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/AEntityMenuHandler.cs.meta
  11. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityContextMenu.cs
  12. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityContextMenu.cs.meta
  13. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityMenuAttribute.cs
  14. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityMenuAttribute.cs.meta
  15. 1 4
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/MenuExample.cs
  16. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/MenuExample.cs.meta
  17. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity.meta
  18. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/EditorLayout.cs
  19. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/EditorLayout.cs.meta
  20. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/SerializationTypeExtension.cs
  21. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/SerializationTypeExtension.cs.meta
  22. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree.meta
  23. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeView.cs
  24. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeView.cs.meta
  25. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeViewItem.cs
  26. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeViewItem.cs.meta
  27. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeWindow.cs
  28. 0 0
      Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeWindow.cs.meta
  29. 8 0
      Unity/Assets/Scripts/Codes/Editor/Plugins.meta
  30. 8 0
      Unity/Assets/Scripts/Codes/Editor/Plugins/Example.meta
  31. 7 0
      Unity/Assets/Scripts/Codes/Editor/Plugins/Example/ExampleEditor.cs
  32. 11 0
      Unity/Assets/Scripts/Codes/Editor/Plugins/Example/ExampleEditor.cs.meta
  33. 27 0
      Unity/Assets/Scripts/Codes/Editor/Unity.Editor.Codes.asmdef
  34. 1 1
      Unity/Assets/Scripts/Codes/Editor/Unity.Editor.Codes.asmdef.meta
  35. 23 0
      Unity/Assets/Scripts/Codes/Hotfix/Unity.Hotfix.Codes.asmdef
  36. 7 0
      Unity/Assets/Scripts/Codes/Hotfix/Unity.Hotfix.Codes.asmdef.meta
  37. 25 0
      Unity/Assets/Scripts/Codes/HotfixView/Unity.HotfixView.Codes.asmdef
  38. 7 0
      Unity/Assets/Scripts/Codes/HotfixView/Unity.HotfixView.Codes.asmdef.meta
  39. 1 1
      Unity/Assets/Scripts/Codes/Model/Unity.Model.Codes.asmdef
  40. 7 0
      Unity/Assets/Scripts/Codes/Model/Unity.Model.Codes.asmdef.meta
  41. 23 0
      Unity/Assets/Scripts/Codes/ModelView/Unity.ModelView.Codes.asmdef
  42. 7 0
      Unity/Assets/Scripts/Codes/ModelView/Unity.ModelView.Codes.asmdef.meta
  43. 68 68
      Unity/Assets/Scripts/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs
  44. 1 1
      Unity/Assets/Scripts/Mono/CodeLoader.cs

+ 5 - 0
.gitignore

@@ -79,3 +79,8 @@ Publish/
 /Unity/Assets/Bundles/AssetBundleOutput
 /Unity/Assets/Bundles/AssetBundleSourceData
 /Unity/Assets/Bundles/AssetBundleSourceData.meta
+/Unity/Unity.Editor.Codes.csproj
+/Unity/Unity.Hotfix.Codes.csproj
+/Unity/Unity.HotfixView.Codes.csproj
+/Unity/Unity.Model.Codes.csproj
+/Unity/Unity.ModelView.Codes.csproj

+ 9 - 3
Book/1.1运行指南.md

@@ -16,7 +16,7 @@
 
 05. 点击Unity菜单 Assets -> Open C# Project 启动vs  
 
-06. 打开Unity菜单ET -> BuildTool 点击BuildCode,这一步将编译客户端代码  
+06. 打开Unity菜单ET/BuildTool 点击BuildCode,这一步将编译客户端代码  
 
 07. 用Rider打开 ET/ET.sln 编译(**一定要全部工程编译,右键VS解决方案,全部编译**)  
 
@@ -24,12 +24,18 @@
 
 09. 注意这是ClientServer模式,Unity中运行了一个服务器。如果需要单独运行服务器,可以按照下面步骤:  
 
-10. 打开Unity菜单ServerTool, 点击StartServer,启动服务器  
+10. 打开Unity菜单ET/ServerTool, 点击StartServer,启动服务器  
 
-11. 打开Unity菜单ET -> BuildTool CodeMode选择Client, 点击BuildCode,这一步将编译客户端代码  
+11. 打开Unity菜单ET/BuildTool CodeMode选择Client, 点击BuildCode,这一步将编译客户端代码  
 
 12. Unity中双击Scenes目录中的Init场景,点击Play即可运行  
 
+# ENABLE_CODES模式
+1. 上面是把逻辑打成了一个dll,unity加载dll运行,这样Unity Editor将无法引用逻辑代码。如果Editor需要用到逻辑代码,可以开启ENABLE_CODES模式  
+2. Unity菜单ET/ChangeDefine/Add ENABLE_CODES即可添加ENABLE_CODES宏,这样逻辑代码将作为Editor模式放到Unity中,Editor代码就可以引用到逻辑代码  
+3. ENABLE_CODES模式不需要再BuildCode,直接点击Play就能运行  
+4. ENABLE_CODES只能在编辑器模式下使用,打包必须去掉ENABLE_CODES宏
+
 
 # 测试状态同步demo
 1. 想修改配置就进入 Excel 目录修改对应的表格,做运行步骤的第6步,然后重新运行 Server.App工程来启动服务端。

+ 2 - 2
Config/NLog/NLog.config

@@ -11,7 +11,7 @@
 				archiveFileName="${basedir}/../Logs/${logger}.${var:appIdFormat}.{#}.Debug.log"
 				fileName="${basedir}/../Logs/${logger}.${var:appIdFormat}.${date:format=yyyyMMddHH}.Debug.log"
 				deleteOldFileOnStartup="false"
-				layout="${longdate} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message}" />
+				layout="${longdate} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=3} ${message}" />
 	</targets>
 
 	<targets async="true">
@@ -65,7 +65,7 @@
 				keepFileOpen="true"
 				fileName="${basedir}/../Logs/${logger}.${var:appIdFormat}.Debug.log"
 				deleteOldFileOnStartup="false"
-				layout="${longdate} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message}" />
+				layout="${longdate} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=3} ${message}" />
 	</targets>
 
 	<targets async="true">

+ 85 - 19
ET.sln

@@ -33,14 +33,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNet.Model", "DotNet\Mode
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNet.ThirdParty", "DotNet\ThirdParty\DotNet.ThirdParty.csproj", "{4B15C845-B5BD-4105-AE91-9B057F8AC134}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Codes", "Unity\Unity.Codes.csproj", "{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}"
-EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Share", "Share", "{1272AF7B-A962-4BA4-8A9C-FFA7E131A0AC}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Share.Analyzer", "Share\Analyzer\Share.Analyzer.csproj", "{FCB2EF97-BA34-49F7-B859-68E1AC98877E}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Share.Tool", "Share\Tool\Share.Tool.csproj", "{1D028A2B-515C-49E2-923B-094CBD89BE5A}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Model.Codes", "Unity\Unity.Model.Codes.csproj", "{F35320F7-9304-81E8-7D71-B379F8BA7E35}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Hotfix.Codes", "Unity\Unity.Hotfix.Codes.csproj", "{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.ModelView.Codes", "Unity\Unity.ModelView.Codes.csproj", "{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.HotfixView.Codes", "Unity\Unity.HotfixView.Codes.csproj", "{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Editor.Codes", "Unity\Unity.Editor.Codes.csproj", "{89DD0821-4AE5-0EE7-65A0-445EF4C85913}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EnableCodes", "EnableCodes", "{13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DisableCodes", "DisableCodes", "{1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -207,18 +219,6 @@ Global
 		{4B15C845-B5BD-4105-AE91-9B057F8AC134}.Release|x64.Build.0 = Release|Any CPU
 		{4B15C845-B5BD-4105-AE91-9B057F8AC134}.Release|x86.ActiveCfg = Release|Any CPU
 		{4B15C845-B5BD-4105-AE91-9B057F8AC134}.Release|x86.Build.0 = Release|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|x64.Build.0 = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Debug|x86.Build.0 = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|Any CPU.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|Any CPU.Build.0 = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|x64.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|x64.Build.0 = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|x86.ActiveCfg = Debug|Any CPU
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944}.Release|x86.Build.0 = Debug|Any CPU
 		{FCB2EF97-BA34-49F7-B859-68E1AC98877E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{FCB2EF97-BA34-49F7-B859-68E1AC98877E}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{FCB2EF97-BA34-49F7-B859-68E1AC98877E}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -243,16 +243,72 @@ Global
 		{1D028A2B-515C-49E2-923B-094CBD89BE5A}.Release|x64.Build.0 = Release|Any CPU
 		{1D028A2B-515C-49E2-923B-094CBD89BE5A}.Release|x86.ActiveCfg = Release|Any CPU
 		{1D028A2B-515C-49E2-923B-094CBD89BE5A}.Release|x86.Build.0 = Release|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|x64.Build.0 = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Debug|x86.Build.0 = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|x64.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|x64.Build.0 = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|x86.ActiveCfg = Debug|Any CPU
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35}.Release|x86.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|x64.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Debug|x86.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|x64.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|x64.Build.0 = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|x86.ActiveCfg = Debug|Any CPU
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D}.Release|x86.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|x64.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Debug|x86.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|x64.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|x64.Build.0 = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|x86.ActiveCfg = Debug|Any CPU
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429}.Release|x86.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|x64.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Debug|x86.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|x64.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|x64.Build.0 = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|x86.ActiveCfg = Debug|Any CPU
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C}.Release|x86.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|x64.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Debug|x86.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|Any CPU.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|Any CPU.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|x64.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|x64.Build.0 = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|x86.ActiveCfg = Debug|Any CPU
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913}.Release|x86.Build.0 = Debug|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
-		{9498BFB4-D9F5-C441-13E3-3F26F7700E29} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
-		{52F66610-896A-C4D1-9881-1A19DF7AB80E} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{041131CD-3018-19B1-81B6-5DBEE2467FFB} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
-		{DE4513D3-889B-5C52-8E9C-744C99AE7509} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
-		{C109842F-01DA-64D4-DBF2-00C6449E459E} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{5910FA29-5797-199C-985B-FC9FC473328E} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{D2AD5BE1-263A-9A30-AB0F-DC5B08044350} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{770E9BEB-B313-3761-FAA2-76DAF4B34ADA} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
@@ -261,9 +317,19 @@ Global
 		{1059524B-9F01-4C3E-8A7C-6BBDD1D174C7} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{6AFC109E-85DE-4A14-9C81-95D93C3F90AE} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{4B15C845-B5BD-4105-AE91-9B057F8AC134} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
-		{C8CDB918-7F4F-0E46-C7AA-900F18D8C944} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{FCB2EF97-BA34-49F7-B859-68E1AC98877E} = {1272AF7B-A962-4BA4-8A9C-FFA7E131A0AC}
 		{1D028A2B-515C-49E2-923B-094CBD89BE5A} = {1272AF7B-A962-4BA4-8A9C-FFA7E131A0AC}
+		{13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
+		{89DD0821-4AE5-0EE7-65A0-445EF4C85913} = {13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}
+		{D2D0DC3C-8414-F3B5-7B89-AEA449F00E4D} = {13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}
+		{AB58BEC6-6A17-B4DC-A2EC-30AE7CA7216C} = {13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}
+		{F35320F7-9304-81E8-7D71-B379F8BA7E35} = {13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}
+		{E80DCC2F-4205-C895-4E78-6ED5FE5CD429} = {13A8B20D-7FCD-4FF2-BCFB-5D31B8B8CBD0}
+		{1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
+		{DE4513D3-889B-5C52-8E9C-744C99AE7509} = {1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6}
+		{52F66610-896A-C4D1-9881-1A19DF7AB80E} = {1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6}
+		{9498BFB4-D9F5-C441-13E3-3F26F7700E29} = {1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6}
+		{C109842F-01DA-64D4-DBF2-00C6449E459E} = {1FF5AB6A-4CC0-4F8D-8B7E-FBECC7712AA6}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {EABC01E3-3EB5-47EF-B46E-AAD8BB3585F1}

+ 39 - 22
Share/Analyzer/Config/AnalyzeAssembly.cs

@@ -2,29 +2,46 @@
 {
     public static class AnalyzeAssembly
     {
-        public const string AppsCore = "Core";
+        private const string DotNetCore = "Core";
+        private const string DotNetModel = "Model";
+        private const string DotNetHotfix = "Hotfix";
+
+        private const string UnityCore = "Unity.Core";
+        private const string UnityModel = "Unity.Model";
+        private const string UnityHotfix = "Unity.Hotfix";
+        private const string UnityModelView = "Unity.ModelView";
+        private const string UnityHotfixView = "Unity.HotfixView";
+
+        private const string UnityModelCodes = "Unity.Model.Codes";
+        private const string UnityHotfixCodes = "Unity.Hotfix.Codes";
+        private const string UnityModelViewCodes = "Unity.ModelView.Codes";
+        private const string UnityHotfixViewCodes = "Unity.HotfixView.Codes";
+
+        public static readonly string[] AllHotfix =
+        {
+            DotNetHotfix, UnityHotfix, UnityHotfixView, 
+            UnityHotfixCodes, UnityHotfixViewCodes
+        };
+
+        public static readonly string[] AllModel =
+        {
+            DotNetModel, UnityModel, 
+            UnityModelView, UnityModel, UnityModelCodes
+        };
+
+        public static readonly string[] AllModelHotfix =
+        {
+            DotNetModel, DotNetHotfix, 
+            UnityModel, UnityHotfix, UnityModelView, UnityHotfixView, 
+            UnityModelCodes, UnityModelViewCodes, UnityHotfixCodes, UnityHotfixViewCodes
+        };
         
-        public const string AppsModel = "Model";
-
-        public const string AppsHotfix = "Hotfix";
-
-        public const string UnityCore = "Unity.Core";
-
-        public const string UnityModel = "Unity.Model";
-
-        public const string UnityHotfix = "Unity.Hotfix";
-
-        public const string UnityModelView = "Unity.ModelView";
-
-        public const string UnityHotfixView = "Unity.HotfixView";
-
-        public static readonly string[] AllHotfix = { AppsHotfix, UnityHotfix, UnityHotfixView };
-
-        public static readonly string[] AllModel = { AppsModel, UnityModel, UnityModelView };
-
-        public static readonly string[] AllModelHotfix = { AppsModel, AppsHotfix, UnityModel, UnityHotfix, UnityModelView, UnityHotfixView };
-        
-        public static readonly string[] All = { AppsCore, AppsModel, AppsHotfix, UnityCore, UnityModel, UnityHotfix, UnityModelView, UnityHotfixView };
+        public static readonly string[] All =
+        {
+            DotNetCore, DotNetModel, DotNetHotfix, 
+            UnityCore, UnityModel, UnityHotfix, UnityModelView, UnityHotfixView, 
+            UnityModelCodes, UnityModelViewCodes, UnityHotfixCodes, UnityHotfixViewCodes
+        };
         
         
     }

+ 8 - 0
Unity/Assets/Scripts/Codes/Editor.meta

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

+ 8 - 0
Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow.meta

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

+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/AEntityMenuHandler.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/AEntityMenuHandler.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/AEntityMenuHandler.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/AEntityMenuHandler.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/EntityContextMenu.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityContextMenu.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/EntityContextMenu.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityContextMenu.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/EntityMenuAttribute.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityMenuAttribute.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/EntityMenuAttribute.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/EntityMenuAttribute.cs.meta


+ 1 - 4
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/MenuExample.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/MenuExample.cs

@@ -1,5 +1,3 @@
-#if ENABLE_CODES
-
 namespace ET
 {
     [EntityMenu(typeof (Unit), "打开属性菜单")]
@@ -12,5 +10,4 @@ namespace ET
             Log.Debug(unit.Config.Name);
         }
     }
-}
-#endif
+}

+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/ContextMenu/MenuExample.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/ContextMenu/MenuExample.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Entity.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Entity/EditorLayout.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/EditorLayout.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Entity/EditorLayout.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/EditorLayout.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/SerializationTypeExtension.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Entity/SerializationTypeExtension.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeView.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeView.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeView.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeView.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeViewItem.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeViewItem.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeViewItem.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeViewItem.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeWindow.cs → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeWindow.cs


+ 0 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/Tree/EntityTreeWindow.cs.meta → Unity/Assets/Scripts/Codes/Editor/EntityTreeWindow/Tree/EntityTreeWindow.cs.meta


+ 8 - 0
Unity/Assets/Scripts/Codes/Editor/Plugins.meta

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

+ 8 - 0
Unity/Assets/Scripts/Codes/Editor/Plugins/Example.meta

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

+ 7 - 0
Unity/Assets/Scripts/Codes/Editor/Plugins/Example/ExampleEditor.cs

@@ -0,0 +1,7 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace ET
+{
+}

+ 11 - 0
Unity/Assets/Scripts/Codes/Editor/Plugins/Example/ExampleEditor.cs.meta

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

+ 27 - 0
Unity/Assets/Scripts/Codes/Editor/Unity.Editor.Codes.asmdef

@@ -0,0 +1,27 @@
+{
+    "name": "Unity.Editor.Codes",
+    "rootNamespace": "",
+    "references": [
+        "Unity.Mono",
+        "Unity.ThirdParty",
+        "Unity.Core",
+        "Unity.Model.Codes",
+        "Unity.Hotfix.Codes",
+        "Unity.ModelView.Codes",
+        "Unity.HotfixView.Codes",
+        "Unity.Editor"
+    ],
+    "includePlatforms": [
+        "Editor"
+    ],
+    "excludePlatforms": [],
+    "allowUnsafeCode": true,
+    "overrideReferences": false,
+    "precompiledReferences": [],
+    "autoReferenced": true,
+    "defineConstraints": [
+        "ENABLE_CODES"
+    ],
+    "versionDefines": [],
+    "noEngineReferences": false
+}

+ 1 - 1
Unity/Assets/Scripts/Codes/Unity.Codes.asmdef.meta → Unity/Assets/Scripts/Codes/Editor/Unity.Editor.Codes.asmdef.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 6271755bd3dca9141ba285578c4790b1
+guid: 1aed51cd6275e0541b03f9feea3a2354
 AssemblyDefinitionImporter:
   externalObjects: {}
   userData: 

+ 23 - 0
Unity/Assets/Scripts/Codes/Hotfix/Unity.Hotfix.Codes.asmdef

@@ -0,0 +1,23 @@
+{
+    "name": "Unity.Hotfix.Codes",
+    "rootNamespace": "",
+    "references": [
+        "Unity.Mono",
+        "Unity.ThirdParty",
+        "Unity.Core",
+        "Unity.Model.Codes"
+    ],
+    "includePlatforms": [
+        "Editor"
+    ],
+    "excludePlatforms": [],
+    "allowUnsafeCode": true,
+    "overrideReferences": false,
+    "precompiledReferences": [],
+    "autoReferenced": true,
+    "defineConstraints": [
+        "ENABLE_CODES"
+    ],
+    "versionDefines": [],
+    "noEngineReferences": false
+}

+ 7 - 0
Unity/Assets/Scripts/Codes/Hotfix/Unity.Hotfix.Codes.asmdef.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2d56d402361754240b71ad908a0879da
+AssemblyDefinitionImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
Unity/Assets/Scripts/Codes/HotfixView/Unity.HotfixView.Codes.asmdef

@@ -0,0 +1,25 @@
+{
+    "name": "Unity.HotfixView.Codes",
+    "rootNamespace": "",
+    "references": [
+        "Unity.Mono",
+        "Unity.ThirdParty",
+        "Unity.Core",
+        "Unity.Model.Codes",
+        "Unity.Hotfix.Codes",
+        "Unity.ModelView.Codes"
+    ],
+    "includePlatforms": [
+        "Editor"
+    ],
+    "excludePlatforms": [],
+    "allowUnsafeCode": true,
+    "overrideReferences": false,
+    "precompiledReferences": [],
+    "autoReferenced": true,
+    "defineConstraints": [
+        "ENABLE_CODES"
+    ],
+    "versionDefines": [],
+    "noEngineReferences": false
+}

+ 7 - 0
Unity/Assets/Scripts/Codes/HotfixView/Unity.HotfixView.Codes.asmdef.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7d8c8789b4b09c048a09d38c44ad1d1f
+AssemblyDefinitionImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Unity/Assets/Scripts/Codes/Unity.Codes.asmdef → Unity/Assets/Scripts/Codes/Model/Unity.Model.Codes.asmdef

@@ -1,5 +1,5 @@
 {
-    "name": "Unity.Codes",
+    "name": "Unity.Model.Codes",
     "rootNamespace": "",
     "references": [
         "Unity.Mono",

+ 7 - 0
Unity/Assets/Scripts/Codes/Model/Unity.Model.Codes.asmdef.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: efc2ca0b51ad54047b25b5c2eb4c19a1
+AssemblyDefinitionImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 23 - 0
Unity/Assets/Scripts/Codes/ModelView/Unity.ModelView.Codes.asmdef

@@ -0,0 +1,23 @@
+{
+    "name": "Unity.ModelView.Codes",
+    "rootNamespace": "",
+    "references": [
+        "Unity.Mono",
+        "Unity.ThirdParty",
+        "Unity.Core",
+        "Unity.Model.Codes"
+    ],
+    "includePlatforms": [
+        "Editor"
+    ],
+    "excludePlatforms": [],
+    "allowUnsafeCode": true,
+    "overrideReferences": false,
+    "precompiledReferences": [],
+    "autoReferenced": true,
+    "defineConstraints": [
+        "ENABLE_CODES"
+    ],
+    "versionDefines": [],
+    "noEngineReferences": false
+}

+ 7 - 0
Unity/Assets/Scripts/Codes/ModelView/Unity.ModelView.Codes.asmdef.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 98395eb17a7c633439d4cc0873eda2ed
+AssemblyDefinitionImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 68 - 68
Unity/Assets/Scripts/Editor/AssetPostProcessor/OnGenerateCSProjectProcessor.cs

@@ -7,85 +7,86 @@ using System.Text;
 
 namespace ET
 {
-    public class OnGenerateCSProjectProcessor : AssetPostprocessor
+    public class OnGenerateCSProjectProcessor: AssetPostprocessor
     {
         public static string OnGeneratedCSProject(string path, string content)
         {
-            if (Define.EnableCodes)
+            if (path.EndsWith("Unity.Core.csproj"))
             {
-                return content;
+                return GenerateCustomProject(path, content);
             }
 
-            if (path.EndsWith("Unity.Hotfix.csproj"))
-            {
-                content =  content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\Hotfix\\Empty.cs\" />", string.Empty);
-                content =  content.Replace("<None Include=\"Assets\\Scripts\\Empty\\Hotfix\\Unity.Hotfix.asmdef\" />", string.Empty);
-            }
-          
-            if (path.EndsWith("Unity.HotfixView.csproj"))
-            {
-                content =  content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\HotfixView\\Empty.cs\" />", string.Empty);
-                content =  content.Replace("<None Include=\"Assets\\Scripts\\Empty\\HotfixView\\Unity.HotfixView.asmdef\" />", string.Empty);
-            }
-          
-            if (path.EndsWith("Unity.Model.csproj"))
-            {
-                content =  content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\Model\\Empty.cs\" />", string.Empty);
-                content =  content.Replace("<None Include=\"Assets\\Scripts\\Empty\\Model\\Unity.Model.asmdef\" />", string.Empty);
-            }
-          
-            if (path.EndsWith("Unity.ModelView.csproj"))
-            {
-                content =  content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\ModelView\\Empty.cs\" />", string.Empty);
-                content =  content.Replace("<None Include=\"Assets\\Scripts\\Empty\\ModelView\\Unity.ModelView.asmdef\" />", string.Empty);
-            }
-          
-            if (path.EndsWith("Unity.Hotfix.csproj"))
+            if (Define.EnableCodes)
             {
-                return GenerateCustomProject(path, content, 
-                    @"Assets\Scripts\Codes\Hotfix\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)", 
-                    @"Assets\Scripts\Codes\Hotfix\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Hotfix\Server\**\*.cs Server\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Hotfix\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Client',''))%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Hotfix\Share\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Share',''))%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Hotfix\Server\**\*.cs Server\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Server',''))%(FileName)%(Extension)"
-                    );
-            }
+                if (path.EndsWith("Unity.Hotfix.Codes.csproj"))
+                {
+                    content = GenerateCustomProject(path, content);
+                }
 
-            if (path.EndsWith("Unity.HotfixView.csproj"))
-            {
-                return GenerateCustomProject(path, content, 
-                    @"Assets\Scripts\Codes\HotfixView\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)", 
-                    @"Assets\Scripts\Codes\HotfixView\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\HotfixView\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('HotfixView\Client',''))%(FileName)%(Extension)"
-                    ); 
-            }
+                if (path.EndsWith("Unity.Model.Codes.csproj"))
+                {
+                    content = GenerateCustomProject(path, content);
+                }
 
-            if (path.EndsWith("Unity.Model.csproj"))
-            {
-                return GenerateCustomProject(path, content,
-                    @"Assets\Scripts\Codes\Model\Server\**\*.cs Server\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Model\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Model\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Model\Generate\Server\**\*.cs Generate\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Model\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Client',''))%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Model\Share\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Share',''))%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\Model\Server\**\*.cs Server\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Server',''))%(FileName)%(Extension)"
-                    );
-            }
+                if (path.EndsWith("Unity.HotfixView.Codes.csproj"))
+                {
+                    content = GenerateCustomProject(path, content);
+                }
 
-            if (path.EndsWith("Unity.ModelView.csproj"))
-            {
-                return GenerateCustomProject(path, content,
-                    @"Assets\Scripts\Codes\ModelView\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\ModelView\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
-                    @"Assets\Scripts\Codes\Plugins\*\ModelView\Client\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('ModelView\Client',''))%(FileName)%(Extension)"
-                    );
+                if (path.EndsWith("Unity.ModelView.Codes.csproj"))
+                {
+                    content = GenerateCustomProject(path, content);
+                }
             }
-
-            if (path.EndsWith("Unity.Core.csproj"))
+            else
             {
-                return GenerateCustomProject(path, content);
+                if (path.EndsWith("Unity.Hotfix.csproj"))
+                {
+                    content = content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\Hotfix\\Empty.cs\" />", string.Empty);
+                    content = content.Replace("<None Include=\"Assets\\Scripts\\Empty\\Hotfix\\Unity.Hotfix.asmdef\" />", string.Empty);
+
+                    content = GenerateCustomProject(path, content,
+                        @"Assets\Scripts\Codes\Hotfix\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Hotfix\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Hotfix\Server\**\*.cs Server\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Hotfix\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Client',''))%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Hotfix\Share\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Share',''))%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Hotfix\Server\**\*.cs Server\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Hotfix\Server',''))%(FileName)%(Extension)");
+                }
+
+                if (path.EndsWith("Unity.HotfixView.csproj"))
+                {
+                    content = content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\HotfixView\\Empty.cs\" />", string.Empty);
+                    content = content.Replace("<None Include=\"Assets\\Scripts\\Empty\\HotfixView\\Unity.HotfixView.asmdef\" />", string.Empty);
+                    content = GenerateCustomProject(path, content,
+                        @"Assets\Scripts\Codes\HotfixView\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\HotfixView\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\HotfixView\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('HotfixView\Client',''))%(FileName)%(Extension)");
+                }
+
+                if (path.EndsWith("Unity.Model.csproj"))
+                {
+                    content = content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\Model\\Empty.cs\" />", string.Empty);
+                    content = content.Replace("<None Include=\"Assets\\Scripts\\Empty\\Model\\Unity.Model.asmdef\" />", string.Empty);
+                    content = GenerateCustomProject(path, content,
+                        @"Assets\Scripts\Codes\Model\Server\**\*.cs Server\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Model\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Model\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Model\Generate\Server\**\*.cs Generate\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Model\Client\**\*.cs Client\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Client',''))%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Model\Share\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Share',''))%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\Model\Server\**\*.cs Server\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('Model\Server',''))%(FileName)%(Extension)");
+                }
+
+                if (path.EndsWith("Unity.ModelView.csproj"))
+                {
+                    content = content.Replace("<Compile Include=\"Assets\\Scripts\\Empty\\ModelView\\Empty.cs\" />", string.Empty);
+                    content = content.Replace("<None Include=\"Assets\\Scripts\\Empty\\ModelView\\Unity.ModelView.asmdef\" />", string.Empty);
+                    content = GenerateCustomProject(path, content,
+                        @"Assets\Scripts\Codes\ModelView\Client\**\*.cs Client\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\ModelView\Share\**\*.cs Share\%(RecursiveDir)%(FileName)%(Extension)",
+                        @"Assets\Scripts\Codes\Plugins\*\ModelView\Client\**\*.cs Share\Plugins\$([System.String]::new(%(RecursiveDir)).Replace('ModelView\Client',''))%(FileName)%(Extension)");
+                }
             }
             return content;
         }
@@ -132,7 +133,6 @@ namespace ET
 
             using (StringWriter sw = new StringWriter())
             {
-
                 using (XmlTextWriter tx = new XmlTextWriter(sw))
                 {
                     tx.Formatting = Formatting.Indented;

+ 1 - 1
Unity/Assets/Scripts/Mono/CodeLoader.cs

@@ -20,7 +20,7 @@ namespace ET
 				foreach (Assembly ass in assemblies)
 				{
 					string name = ass.GetName().Name;
-					if (name == "Unity.Codes")
+					if (name == "Unity.Model.Codes")
 					{
 						this.assembly = ass;
 					}