瀏覽代碼

1.增加将资源打包到apk的功能,加载ab包的时候先判断热更里面有没有,有则加载热更的,没有则加载StreamingAssets里面的
2.MyEditor命名空间改成ETEditor

tanghai 7 年之前
父節點
當前提交
4c14111af6
共有 47 個文件被更改,包括 447 次插入198 次删除
  1. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BTBatchOperation.cs
  2. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BTDesignerUtility.cs
  3. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BTEditor.cs
  4. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BTEditorWindow.cs
  5. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorNodeConfigExtension.cs
  6. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorNodeData.cs
  7. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeConfigEditor.cs
  8. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeConfigExtension.cs
  9. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeData.cs
  10. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeMenu.cs
  11. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeNodeClassPopup.cs
  12. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeOperateUtility.cs
  13. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeTipsHelper.cs
  14. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Component/BTDebugComponent.cs
  15. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Component/BTNodeInfoComponent.cs
  16. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/CustomArrayField.cs
  17. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeAfterChangeNodeTypeEvent_SelectNode.cs
  18. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeClickNodeEvent_SelectNode.cs
  19. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeConnectStateEvent_HandleConnectLines.cs
  20. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeCreateNodeEvent_SelectNode.cs
  21. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeMouseInNodeEvent_HandleOperate.cs
  22. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeNewCreateClickEvent_CreateNode.cs
  23. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeOpenEditorEvent_SelectNode.cs
  24. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeOpenEditorEvent_UpdatePropList.cs
  25. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeReplaceClickEvent_ReplaceNode.cs
  26. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeRightDesignerDragEvent_ModifyRightBorder.cs
  27. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeRunTreeEvent_ShowDebugInfo.cs
  28. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/FoldoutNode.cs
  29. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/GraphDesigner.cs
  30. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/NodeDesigner.cs
  31. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/NodeExtension.cs
  32. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/NodeMetaHelper.cs
  33. 1 1
      Unity/Assets/Editor/BehaviorTreeEditor/PropertyDesigner.cs
  34. 135 87
      Unity/Assets/Editor/BuildEditor/BuildEditor.cs
  35. 13 10
      Unity/Assets/Editor/BuildEditor/BuildHelper.cs
  36. 1 1
      Unity/Assets/Editor/GlobalConfigEditor/GlobalConfigEditor.cs
  37. 1 1
      Unity/Assets/Editor/Proto2CsEditor/Proto2CSEditor.cs
  38. 1 1
      Unity/Assets/Editor/RsyncEditor/RsyncConfig.cs
  39. 1 1
      Unity/Assets/Editor/RsyncEditor/RsyncEditor.cs
  40. 1 1
      Unity/Assets/Editor/ServerCommandLineEditor/ServerCommandLineEditor.cs
  41. 4 20
      Unity/Assets/Scripts/Helper/PathHelper.cs
  42. 43 11
      Unity/Assets/Scripts/Module/AssetsBundle/ResourcesComponent.cs
  43. 202 24
      Unity/Assets/Scripts/Module/Message/Network/KCP/Kcp.cs
  44. 3 2
      Unity/Unity.Editor.Plugins.csproj
  45. 3 2
      Unity/Unity.Editor.csproj
  46. 3 2
      Unity/Unity.Plugins.csproj
  47. 3 2
      Unity/Unity.csproj

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BTBatchOperation.cs

@@ -4,7 +4,7 @@ using System.Reflection;
 using ETModel;
 using UnityEditor;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BTBatchOperation
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BTDesignerUtility.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public static class BTDesignerUtility
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BTEditor.cs

@@ -7,7 +7,7 @@ using UnityEngine;
 using Component = UnityEngine.Component;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BTEditor: Entity
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BTEditorWindow.cs

@@ -1,7 +1,7 @@
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public enum SubWinType
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorNodeConfigExtension.cs

@@ -1,7 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Reflection;
-using MyEditor;
+using ETEditor;
 using UnityEngine;
 
 namespace ETModel

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorNodeData.cs

@@ -2,7 +2,7 @@
 using ETModel;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public enum DebugState
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeConfigEditor.cs

@@ -2,7 +2,7 @@
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[CustomEditor(typeof(BehaviorTreeConfig))]
 	public class BehaviorTreeConfigEditor: Editor

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeConfigExtension.cs

@@ -1,6 +1,6 @@
 using System;
 using System.Reflection;
-using MyEditor;
+using ETEditor;
 using UnityEngine;
 
 namespace ETModel

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeData.cs

@@ -2,7 +2,7 @@
 using ETModel;
 using MongoDB.Bson.Serialization.Attributes;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[BsonIgnoreExtraElements]
 	[Serializable]

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeMenu.cs

@@ -2,7 +2,7 @@
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class AlterBundleNameWindow: EditorWindow
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeNodeClassPopup.cs

@@ -4,7 +4,7 @@ using ETModel;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BehaviorTreeNodeClassPopup
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeOperateUtility.cs

@@ -6,7 +6,7 @@ using UnityEditor;
 using UnityEngine;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BehaviourTreeNodeProxy<T> where T : Node
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/BehaviorTreeTipsHelper.cs

@@ -1,6 +1,6 @@
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public static class BehaviorTreeTipsHelper
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Component/BTDebugComponent.cs

@@ -1,7 +1,7 @@
 using System.Collections.Generic;
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BTDebugComponent: Component
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Component/BTNodeInfoComponent.cs

@@ -2,7 +2,7 @@
 using System.Linq;
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[ObjectSystem]
 	public class BtNodeInfoComponentSystem : AwakeSystem<BTNodeInfoComponent>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/CustomArrayField.cs

@@ -3,7 +3,7 @@ using UnityEditor;
 using UnityEngine;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public static class CustomArrayField
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeAfterChangeNodeTypeEvent_SelectNode.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeAfterChangeNodeType)]
 	public class BehaviorTreeAfterChangeNodeTypeEvent_SelectNode: AEvent

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeClickNodeEvent_SelectNode.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeClickNode)]
 	public class BehaviorTreeClickNodeEvent_SelectNode: AEvent<NodeDesigner>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeConnectStateEvent_HandleConnectLines.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeConnectState)]
 	public class BehaviorTreeConnectStateEvent_HandleConnectLines: AEvent<NodeDesigner, State>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeCreateNodeEvent_SelectNode.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeCreateNode)]
 	public class BehaviorTreeCreateNodeEvent_SelectNode: AEvent<NodeDesigner>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeMouseInNodeEvent_HandleOperate.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeMouseInNode)]
 	public class BehaviorTreeMouseInNodeEvent_HandleOperate: AEvent<BehaviorNodeData, NodeDesigner>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeNewCreateClickEvent_CreateNode.cs

@@ -1,7 +1,7 @@
 using ETModel;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreePropertyDesignerNewCreateClick)]
 	public class BehaviorTreeNewCreateClickEvent_CreateNode: AEvent<string, Vector2>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeOpenEditorEvent_SelectNode.cs

@@ -1,7 +1,7 @@
 using ETModel;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeOpenEditor)]
 	public class BehaviorTreeOpenEditorEvent_SelectNode: AEvent

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeOpenEditorEvent_UpdatePropList.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeOpenEditor)]
 	public class BehaviorTreeOpenEditorEvent_UpdatePropList: AEvent

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeReplaceClickEvent_ReplaceNode.cs

@@ -1,7 +1,7 @@
 using ETModel;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeReplaceClick)]
 	public class BehaviorTreeReplaceClickEvent_ReplaceNode: AEvent<string, Vector2>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeRightDesignerDragEvent_ModifyRightBorder.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeRightDesignerDrag)]
 	public class BehaviorTreeRightDesignerDragEvent_ModifyRightBorder: AEvent<float>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/Event/BehaviorTreeRunTreeEvent_ShowDebugInfo.cs

@@ -1,6 +1,6 @@
 using ETModel;
 
-namespace MyEditor
+namespace ETEditor
 {
 	[Event(EventIdType.BehaviorTreeRunTreeEvent)]
 	public class BehaviorTreeRunTreeEvent_ShowDebugInfo: AEvent<BehaviorTree>

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/FoldoutNode.cs

@@ -1,7 +1,7 @@
 using System.Collections.Generic;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class FoldoutNode //折叠的节点
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/GraphDesigner.cs

@@ -4,7 +4,7 @@ using ETModel;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public enum State
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/NodeDesigner.cs

@@ -2,7 +2,7 @@
 using ETModel;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class NodeDesigner
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/NodeExtension.cs

@@ -1,7 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.Reflection;
-using MyEditor;
+using ETEditor;
 using UnityEditor;
 using UnityEngine;
 

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/NodeMetaHelper.cs

@@ -5,7 +5,7 @@ using ETModel;
 using UnityEngine;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public enum NodeChildLimitType
 	{

+ 1 - 1
Unity/Assets/Editor/BehaviorTreeEditor/PropertyDesigner.cs

@@ -5,7 +5,7 @@ using UnityEditor;
 using UnityEngine;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class PropertyDesigner: Editor
 	{

+ 135 - 87
Unity/Assets/Editor/BuildEditor/BuildEditor.cs

@@ -6,7 +6,7 @@ using UnityEditor;
 using UnityEngine;
 using Object = UnityEngine.Object;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class BundleInfo
 	{
@@ -19,7 +19,6 @@ namespace MyEditor
 		Android,
 		IOS,
 		PC,
-		WebGL,
 	}
 
 	public class BuildEditor : EditorWindow
@@ -28,6 +27,7 @@ namespace MyEditor
 
 		private PlatformType platformType;
 		private bool isBuildExe;
+		private bool isContainAB;
 		private BuildOptions buildOptions = BuildOptions.AllowDebugging | BuildOptions.Development;
 		private BuildAssetBundleOptions buildAssetBundleOptions = BuildAssetBundleOptions.None;
 
@@ -44,8 +44,14 @@ namespace MyEditor
 				SetPackingTagAndAssetBundle();
 			}
 
+			if (GUILayout.Button("清除标记"))
+			{
+				ClearPackingTagAndAssetBundle();
+			}
+
 			this.platformType = (PlatformType)EditorGUILayout.EnumPopup(platformType);
 			this.isBuildExe = EditorGUILayout.Toggle("是否打包EXE: ", this.isBuildExe);
+			this.isContainAB = EditorGUILayout.Toggle("是否同将资源打进EXE: ", this.isContainAB);
 			this.buildOptions = (BuildOptions)EditorGUILayout.EnumMaskField("BuildOptions(可多选): ", this.buildOptions);
 			this.buildAssetBundleOptions = (BuildAssetBundleOptions)EditorGUILayout.EnumMaskField("BuildAssetBundleOptions(可多选): ", this.buildAssetBundleOptions);
 
@@ -56,7 +62,7 @@ namespace MyEditor
 					Log.Error("请选择打包平台!");
 					return;
 				}
-				BuildHelper.Build(this.platformType, this.buildAssetBundleOptions, this.buildOptions, this.isBuildExe);
+				BuildHelper.Build(this.platformType, this.buildAssetBundleOptions, this.buildOptions, this.isBuildExe, this.isContainAB);
 			}
 		}
 
@@ -66,15 +72,14 @@ namespace MyEditor
 
 			SetIndependentBundleAndAtlas("Assets/Bundles/Independent");
 
-			SetShareBundleAndAtlas("Assets/Bundles/UI");
+			SetBundleAndAtlasWithoutShare("Assets/Bundles/UI");
 
-			SetShareBundleAndAtlas("Assets/Bundles/Unit");
+			SetRootBundleOnly("Assets/Bundles/Unit");
 
 			AssetDatabase.SaveAssets();
 			AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate);
 		}
 
-		// 这个目录下的prefab引用的图片不打图集
 		private static void SetNoAtlas(string dir)
 		{
 			List<string> paths = EditorResHelper.GetPrefabsAndScenes(dir);
@@ -85,25 +90,17 @@ namespace MyEditor
 
 				foreach (string pt in pathes)
 				{
-					string extension = Path.GetExtension(pt);
-					if (extension == ".cs" || extension == ".dll")
-					{
-						continue;
-					}
-					if (pt.Contains("Resources"))
-					{
-						continue;
-					}
 					if (pt == path)
 					{
 						continue;
 					}
 
-					SetAtlas(pt, "");
+					SetAtlas(pt, "", true);
 				}
 			}
 		}
-		
+
+		// 会将目录下的每个prefab引用的资源强制打成一个包,不分析共享资源
 		private static void SetBundles(string dir)
 		{
 			List<string> paths = EditorResHelper.GetPrefabsAndScenes(dir);
@@ -116,6 +113,19 @@ namespace MyEditor
 			}
 		}
 
+		// 会将目录下的每个prefab引用的资源打成一个包,只给顶层prefab打包
+		private static void SetRootBundleOnly(string dir)
+		{
+			List<string> paths = EditorResHelper.GetPrefabsAndScenes(dir);
+			foreach (string path in paths)
+			{
+				string path1 = path.Replace('\\', '/');
+				Object go = AssetDatabase.LoadAssetAtPath<Object>(path1);
+
+				SetBundle(path1, go.name);
+			}
+		}
+
 		// 会将目录下的每个prefab引用的资源强制打成一个包,不分析共享资源
 		private static void SetIndependentBundleAndAtlas(string dir)
 		{
@@ -137,34 +147,48 @@ namespace MyEditor
 
 				foreach (string pt in pathes)
 				{
-					string extension = Path.GetExtension(pt);
-					if (extension == ".cs" || extension == ".dll")
-					{
-						continue;
-					}
-					if (pt.Contains("Resources"))
-					{
-						continue;
-					}
 					if (pt == path1)
 					{
 						continue;
 					}
 
-					SetBundleAndAtlas(pt, go.name);
+					SetBundleAndAtlas(pt, go.name, true);
 				}
 			}
 		}
 
+		private static void SetBundleAndAtlasWithoutShare(string dir)
+		{
+			List<string> paths = EditorResHelper.GetPrefabsAndScenes(dir);
+			foreach (string path in paths)
+			{
+				string path1 = path.Replace('\\', '/');
+				Object go = AssetDatabase.LoadAssetAtPath<Object>(path1);
+
+				SetBundle(path1, go.name);
+
+				//List<string> pathes = CollectDependencies(path1);
+				//foreach (string pt in pathes)
+				//{
+				//	if (pt == path1)
+				//	{
+				//		continue;
+				//	}
+				//
+				//	SetBundleAndAtlas(pt, go.name);
+				//}
+			}
+		}
+
 		private static List<string> CollectDependencies(string o)
 		{
 			string[] paths = AssetDatabase.GetDependencies(o);
 
-			Log.Info($"{o} dependecies: " + paths.ToList().ListToString());
+			//Log.Debug($"{o} dependecies: " + paths.ToList().ListToString());
 			return paths.ToList();
 		}
 
-		// 目录下每个prefab打个包,分析共享资源,共享资源打个包
+		// 分析共享资源
 		private void SetShareBundleAndAtlas(string dir)
 		{
 			this.dictionary.Clear();
@@ -180,15 +204,6 @@ namespace MyEditor
 				List<string> pathes = CollectDependencies(path1);
 				foreach (string pt in pathes)
 				{
-					string extension = Path.GetExtension(pt);
-					if (extension == ".cs" || extension == ".dll")
-					{
-						continue;
-					}
-					if (pt.Contains("Resources"))
-					{
-						continue;
-					}
 					if (pt == path1)
 					{
 						continue;
@@ -197,6 +212,11 @@ namespace MyEditor
 					// 不存在则记录下来
 					if (!this.dictionary.ContainsKey(pt))
 					{
+						// 如果已经设置了包
+						if (GetBundleName(pt) != "")
+						{
+							continue;
+						}
 						Log.Info($"{path1}----{pt}");
 						BundleInfo bundleInfo = new BundleInfo();
 						bundleInfo.ParentPaths.Add(path1);
@@ -218,77 +238,99 @@ namespace MyEditor
 					DirectoryInfo dirInfo = new DirectoryInfo(dir);
 					string dirName = dirInfo.Name;
 
-					SetBundleAndAtlas(pt, $"{dirName}-share");
+					SetBundleAndAtlas(pt, $"{dirName}-share", true);
 				}
 			}
 		}
 
 		private static void ClearPackingTagAndAssetBundle()
 		{
-			List<string> bundlePaths = EditorResHelper.GetAllResourcePath("Assets/Bundles/", true);
-			foreach (string bundlePath in bundlePaths)
-			{
-				AssetImporter importer = AssetImporter.GetAtPath(bundlePath);
-				if (importer == null)
-				{
-					continue;
-				}
-				//Log.Info(bundlePath);
-				importer.assetBundleName = "";
-			}
+			//List<string> bundlePaths = EditorResHelper.GetAllResourcePath("Assets/Bundles/", true);
+			//foreach (string bundlePath in bundlePaths)
+			//{
+			//	SetBundle(bundlePath, "", true);
+			//}
 
 			List<string> paths = EditorResHelper.GetAllResourcePath("Assets/Res", true);
 			foreach (string pt in paths)
 			{
-				string extendName = Path.GetExtension(pt);
-				if (extendName == ".cs")
-				{
-					continue;
-				}
+				SetBundleAndAtlas(pt, "", true);
+			}
+		}
 
-				AssetImporter importer = AssetImporter.GetAtPath(pt);
-				if (importer == null)
-				{
-					continue;
-				}
-				//Log.Info(bundlePath);
-				importer.assetBundleName = "";
+		private static string GetBundleName(string path)
+		{
+			string extension = Path.GetExtension(path);
+			if (extension == ".cs" || extension == ".dll" || extension == ".js")
+			{
+				return "";
+			}
+			if (path.Contains("Resources"))
+			{
+				return "";
+			}
 
-				SetAtlas(pt, "");
+			AssetImporter importer = AssetImporter.GetAtPath(path);
+			if (importer == null)
+			{
+				return "";
 			}
+
+			return importer.assetBundleName;
 		}
 
-		private static void SetBundle(string path, string name)
+		private static void SetBundle(string path, string name, bool overwrite = false)
 		{
+			string extension = Path.GetExtension(path);
+			if (extension == ".cs" || extension == ".dll" || extension == ".js")
+			{
+				return;
+			}
+			if (path.Contains("Resources"))
+			{
+				return;
+			}
+
 			AssetImporter importer = AssetImporter.GetAtPath(path);
 			if (importer == null)
 			{
 				return;
 			}
 
-			//Log.Info(path);
-			string bundleName = "";
-			if (name == "")
+			if (importer.assetBundleName != "" && overwrite == false)
 			{
 				return;
 			}
-			if (importer.assetBundleName != "")
+
+			//Log.Info(path);
+			string bundleName = "";
+			if (name != "")
 			{
-				return;
+				bundleName = $"{name}.unity3d";
 			}
-			bundleName = $"{name}.unity3d";
+
 			importer.assetBundleName = bundleName;
 		}
 
-		private static void SetAtlas(string path, string name)
+		private static void SetAtlas(string path, string name, bool overwrite = false)
 		{
+			string extension = Path.GetExtension(path);
+			if (extension == ".cs" || extension == ".dll" || extension == ".js")
+			{
+				return;
+			}
+			if (path.Contains("Resources"))
+			{
+				return;
+			}
+
 			TextureImporter textureImporter = AssetImporter.GetAtPath(path) as TextureImporter;
 			if (textureImporter == null)
 			{
 				return;
 			}
 
-			if (textureImporter.spritePackingTag != "")
+			if (textureImporter.spritePackingTag != "" && overwrite == false)
 			{
 				return;
 			}
@@ -297,26 +339,34 @@ namespace MyEditor
 			AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate);
 		}
 
-		private static void SetBundleAndAtlas(string path, string name)
+		private static void SetBundleAndAtlas(string path, string name, bool overwrite = false)
 		{
-			AssetImporter importer = AssetImporter.GetAtPath(path);
-			if (importer == null)
+			string extension = Path.GetExtension(path);
+			if (extension == ".cs" || extension == ".dll" || extension == ".js" || extension == ".mat")
 			{
 				return;
 			}
-
-			//Log.Info(path);
-			string bundleName = "";
-			if (name == "")
+			if (path.Contains("Resources"))
 			{
 				return;
 			}
-			if (importer.assetBundleName != "")
+
+			AssetImporter importer = AssetImporter.GetAtPath(path);
+			if (importer == null)
 			{
 				return;
 			}
-			bundleName = $"{name}.unity3d";
-			importer.assetBundleName = bundleName;
+
+			if (importer.assetBundleName == "" || overwrite)
+			{
+				string bundleName = "";
+				if (name != "")
+				{
+					bundleName = $"{name}.unity3d";
+				}
+
+				importer.assetBundleName = bundleName;
+			}
 
 			TextureImporter textureImporter = importer as TextureImporter;
 			if (textureImporter == null)
@@ -324,13 +374,11 @@ namespace MyEditor
 				return;
 			}
 
-			if (textureImporter.spritePackingTag != "")
+			if (textureImporter.spritePackingTag == "" || overwrite)
 			{
-				return;
+				textureImporter.spritePackingTag = name;
+				AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate);
 			}
-
-			textureImporter.spritePackingTag = name;
-			AssetDatabase.ImportAsset(path, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate);
 		}
 	}
 }

+ 13 - 10
Unity/Assets/Editor/BuildEditor/BuildHelper.cs

@@ -2,7 +2,7 @@
 using ETModel;
 using UnityEditor;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public static class BuildHelper
 	{
@@ -10,7 +10,7 @@ namespace MyEditor
 
 		public static string BuildFolder = "../Release/{0}/StreamingAssets/";
 		
-		//[MenuItem("Tools/编译Hotfix")]
+		[MenuItem("Tools/编译Hotfix")]
 		public static void BuildHotfix()
 		{
 			System.Diagnostics.Process process = new System.Diagnostics.Process();
@@ -28,12 +28,11 @@ namespace MyEditor
 			process.StartInfo.RedirectStandardError = true;
 			process.Start();
 			string info = process.StandardOutput.ReadToEnd();
-			process.WaitForExit();
 			process.Close();
 			Log.Info(info);
 		}
 
-		[MenuItem("Tools/Web资源服务器")]
+		[MenuItem("Tools/web资源服务器")]
 		public static void OpenFileServer()
 		{
 			string currentDir = System.Environment.CurrentDirectory;
@@ -45,7 +44,7 @@ namespace MyEditor
 			process.Start();
 		}
 
-		public static void Build(PlatformType type, BuildAssetBundleOptions buildAssetBundleOptions, BuildOptions buildOptions, bool isBuildExe)
+		public static void Build(PlatformType type, BuildAssetBundleOptions buildAssetBundleOptions, BuildOptions buildOptions, bool isBuildExe, bool isContainAB)
 		{
 			BuildTarget buildTarget = BuildTarget.StandaloneWindows;
 			string exeName = "ET";
@@ -62,9 +61,6 @@ namespace MyEditor
 				case PlatformType.IOS:
 					buildTarget = BuildTarget.iOS;
 					break;
-				case PlatformType.WebGL:
-					buildTarget = BuildTarget.WebGL;
-					break;
 			}
 
 			string fold = string.Format(BuildFolder, type);
@@ -75,12 +71,19 @@ namespace MyEditor
 			
 			Log.Info("开始资源打包");
 			BuildPipeline.BuildAssetBundles(fold, buildAssetBundleOptions, buildTarget);
-
+			
 			GenerateVersionInfo(fold);
 			Log.Info("完成资源打包");
-			
+
+			if (isContainAB)
+			{
+				FileHelper.CleanDirectory("Assets/StreamingAssets/");
+				FileHelper.CopyDirectory(fold, "Assets/StreamingAssets/");
+			}
+
 			if (isBuildExe)
 			{
+				AssetDatabase.Refresh();
 				string[] levels = {
 					"Assets/Scenes/Init.unity",
 				};

+ 1 - 1
Unity/Assets/Editor/GlobalConfigEditor/GlobalConfigEditor.cs

@@ -3,7 +3,7 @@ using ETModel;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
     public class GlobalProtoEditor: EditorWindow
     {

+ 1 - 1
Unity/Assets/Editor/Proto2CsEditor/Proto2CSEditor.cs

@@ -5,7 +5,7 @@ using System.Text;
 using ETModel;
 using UnityEditor;
 
-namespace MyEditor
+namespace ETEditor
 {
 	class OpcodeInfo
 	{

+ 1 - 1
Unity/Assets/Editor/RsyncEditor/RsyncConfig.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class RsyncConfig
 	{

+ 1 - 1
Unity/Assets/Editor/RsyncEditor/RsyncEditor.cs

@@ -4,7 +4,7 @@ using ETModel;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class RsyncEditor: EditorWindow
 	{

+ 1 - 1
Unity/Assets/Editor/ServerCommandLineEditor/ServerCommandLineEditor.cs

@@ -8,7 +8,7 @@ using MongoDB.Bson;
 using UnityEditor;
 using UnityEngine;
 
-namespace MyEditor
+namespace ETEditor
 {
 	public class ServerCommandLineEditor: EditorWindow
 	{

+ 4 - 20
Unity/Assets/Scripts/Helper/PathHelper.cs

@@ -1,14 +1,11 @@
-
-using System;
-using System.Text;
-using UnityEngine;
+using UnityEngine;
 
 namespace ETModel
 {
     public static class PathHelper
     {     /// <summary>
-          ///应用程序外部资源路径存放路径(热更新资源路径)
-          /// </summary>
+        ///应用程序外部资源路径存放路径(热更新资源路径)
+        /// </summary>
         public static string AppHotfixResPath
         {
             get
@@ -31,20 +28,7 @@ namespace ETModel
         {
             get
             {
-                string path = string.Empty;
-                switch (Application.platform)
-                {
-                    case RuntimePlatform.Android:
-                        path = $"jar:file://{Application.dataPath}!!/assets/";
-                        break;
-                    case RuntimePlatform.IPhonePlayer:
-                        path = $"{Application.dataPath}/Raw/";
-                        break;
-                    default:
-                        path = $"{Application.dataPath}/StreamingAssets/";
-                        break;
-                }
-                return path;
+                return Application.streamingAssetsPath;
             }
         }
     }

+ 43 - 11
Unity/Assets/Scripts/Module/AssetsBundle/ResourcesComponent.cs

@@ -79,6 +79,13 @@ namespace ETModel
 				abInfo.Value?.AssetBundle?.Unload(true);
 			}
 
+			while (cacheDictionary.Count > 0)
+			{
+				ABInfo abInfo = this.cacheDictionary.FirstValue;
+				this.cacheDictionary.Dequeue();
+				abInfo.AssetBundle?.Unload(true);
+			}
+
 			this.bundles.Clear();
 			this.cacheDictionary.Clear();
 			this.resourceCache.Clear();
@@ -93,11 +100,7 @@ namespace ETModel
 			{
 				throw new Exception($"not found asset: {path}");
 			}
-			
-			if (resource == null)
-			{
-				throw new Exception($"asset type error, path: {path}");
-			}
+
 			return resource;
 		}
 
@@ -118,13 +121,14 @@ namespace ETModel
 		{
 			assetBundleName = assetBundleName.ToLower();
 
-			//Log.Debug($"unload bundle {assetBundleName}");
 			ABInfo abInfo;
 			if (!this.bundles.TryGetValue(assetBundleName, out abInfo))
 			{
 				throw new Exception($"not found assetBundle: {assetBundleName}");
 			}
 
+			//Log.Debug($"---------- unload one bundle {assetBundleName} refcount: {abInfo.RefCount}");
+
 			--abInfo.RefCount;
 			if (abInfo.RefCount > 0)
 			{
@@ -155,7 +159,7 @@ namespace ETModel
 			assetBundleName = assetBundleName.ToLower();
 			string[] dependencies = ResourcesHelper.GetSortedDependencies(assetBundleName);
 
-			Log.Debug($"-----------dep load {assetBundleName} dep: {dependencies.ToList().ListToString()}");
+			//Log.Debug($"-----------dep load {assetBundleName} dep: {dependencies.ToList().ListToString()}");
 			foreach (string dependency in dependencies)
 			{
 				if (string.IsNullOrEmpty(dependency))
@@ -168,6 +172,7 @@ namespace ETModel
 
 		public void LoadOneBundle(string assetBundleName)
 		{
+			//Log.Debug($"---------------load one bundle {assetBundleName}");
 			ABInfo abInfo;
 			if (this.bundles.TryGetValue(assetBundleName, out abInfo))
 			{
@@ -204,7 +209,22 @@ namespace ETModel
 				return;
 			}
 
-			AssetBundle assetBundle = AssetBundle.LoadFromFile(Path.Combine(PathHelper.AppHotfixResPath, assetBundleName));
+			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)
+			{
+				throw new Exception($"assets bundle not found: {assetBundleName}");
+			}
 
 			if (!assetBundle.isStreamedSceneAssetBundle)
 			{
@@ -243,6 +263,7 @@ namespace ETModel
 
 		public async Task LoadOneBundleAsync(string assetBundleName)
 		{
+			//Log.Debug($"---------------load one bundle {assetBundleName}");
 			ABInfo abInfo;
 			if (this.bundles.TryGetValue(assetBundleName, out abInfo))
 			{
@@ -279,10 +300,21 @@ namespace ETModel
 				return;
 			}
 
-			AssetBundle assetBundle;
-			using (AssetsBundleLoaderAsync assetsBundleLoaderAsync = ComponentFactory.Create<AssetsBundleLoaderAsync>())
+			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)
 			{
-				assetBundle = await assetsBundleLoaderAsync.LoadAsync(assetBundleName);
+				throw new Exception($"assets bundle not found: {assetBundleName}");
 			}
 
 			if (!assetBundle.isStreamedSceneAssetBundle)

+ 202 - 24
Unity/Assets/Scripts/Module/Message/Network/KCP/Kcp.cs

@@ -110,7 +110,10 @@ public class Kcp
 	{
 		var arr = new T[p.Length + 1];
 		for (int i = 0; i < p.Length; i++)
+		{
 			arr[i] = p[i];
+		}
+
 		arr[p.Length] = c;
 		return arr;
 	}
@@ -119,9 +122,15 @@ public class Kcp
 	{
 		var arr = new T[p.Length + cs.Length];
 		for (int i = 0; i < p.Length; i++)
+		{
 			arr[i] = p[i];
+		}
+
 		for (int i = 0; i < cs.Length; i++)
+		{
 			arr[p.Length + i] = cs[i];
+		}
+
 		return arr;
 	}
 
@@ -257,15 +266,21 @@ public class Kcp
 	public int PeekSize()
 	{
 		if (0 == rcv_queue.Length)
+		{
 			return -1;
+		}
 
 		Segment seq = rcv_queue[0];
 
 		if (0 == seq.frg)
+		{
 			return seq.data.Length;
+		}
 
 		if (rcv_queue.Length < seq.frg + 1)
+		{
 			return -1;
+		}
 
 		int length = 0;
 
@@ -273,7 +288,9 @@ public class Kcp
 		{
 			length += item.data.Length;
 			if (0 == item.frg)
+			{
 				break;
+			}
 		}
 
 		return length;
@@ -283,18 +300,26 @@ public class Kcp
 	public int Recv(byte[] buffer)
 	{
 		if (0 == rcv_queue.Length)
+		{
 			return -1;
+		}
 
 		int peekSize = PeekSize();
 		if (0 > peekSize)
+		{
 			return -2;
+		}
 
 		if (peekSize > buffer.Length)
+		{
 			return -3;
+		}
 
 		bool fast_recover = false;
 		if (rcv_queue.Length >= rcv_wnd)
+		{
 			fast_recover = true;
+		}
 
 		// merge fragment.
 		int count = 0;
@@ -305,15 +330,20 @@ public class Kcp
 			n += seg.data.Length;
 			count++;
 			if (0 == seg.frg)
+			{
 				break;
+			}
 		}
 
 		if (0 < count)
+		{
 			this.rcv_queue = slice(this.rcv_queue, count, this.rcv_queue.Length);
+		}
 
 		// move available data from rcv_buf -> rcv_queue
 		count = 0;
 		foreach (Segment seg in rcv_buf)
+		{
 			if (seg.sn == this.rcv_nxt && this.rcv_queue.Length < this.rcv_wnd)
 			{
 				this.rcv_queue = append(this.rcv_queue, seg);
@@ -324,13 +354,18 @@ public class Kcp
 			{
 				break;
 			}
+		}
 
 		if (0 < count)
-			rcv_buf = slice(rcv_buf, count, rcv_buf.Length);
+		{
+			this.rcv_buf = slice(this.rcv_buf, count, this.rcv_buf.Length);
+		}
 
 		// fast recover
 		if (rcv_queue.Length < rcv_wnd && fast_recover)
+		{
 			this.probe |= IKCP_ASK_TELL;
+		}
 
 		return n;
 	}
@@ -339,7 +374,9 @@ public class Kcp
 	public int Send(byte[] bytes, int index, int length)
 	{
 		if (0 == bytes.Length)
+		{
 			return -1;
+		}
 
 		if (length == 0)
 		{
@@ -349,15 +386,23 @@ public class Kcp
 		int count = 0;
 
 		if (length < mss)
+		{
 			count = 1;
+		}
 		else
-			count = (int)(length + mss - 1) / (int)mss;
+		{
+			count = (int)(length + this.mss - 1) / (int)this.mss;
+		}
 
 		if (255 < count)
+		{
 			return -2;
+		}
 
 		if (0 == count)
+		{
 			count = 1;
+		}
 
 		int offset = 0;
 
@@ -365,9 +410,13 @@ public class Kcp
 		{
 			int size = 0;
 			if (length - offset > mss)
-				size = (int)mss;
+			{
+				size = (int)this.mss;
+			}
 			else
+			{
 				size = length - offset;
+			}
 
 			Segment seg = new Segment(size);
 			Array.Copy(bytes, offset + index, seg.data, 0, size);
@@ -391,12 +440,16 @@ public class Kcp
 		{
 			Int32 delta = (Int32)((UInt32)rtt - rx_srtt);
 			if (0 > delta)
+			{
 				delta = -delta;
+			}
 
 			rx_rttval = (3 * rx_rttval + (uint)delta) / 4;
 			rx_srtt = (UInt32)((7 * rx_srtt + rtt) / 8);
 			if (rx_srtt < 1)
-				rx_srtt = 1;
+			{
+				this.rx_srtt = 1;
+			}
 		}
 
 		int rto = (int)(rx_srtt + _imax_(1, 4 * rx_rttval));
@@ -406,15 +459,21 @@ public class Kcp
 	private void shrink_buf()
 	{
 		if (snd_buf.Length > 0)
-			snd_una = snd_buf[0].sn;
+		{
+			this.snd_una = this.snd_buf[0].sn;
+		}
 		else
-			snd_una = snd_nxt;
+		{
+			this.snd_una = this.snd_nxt;
+		}
 	}
 
 	private void parse_ack(UInt32 sn)
 	{
 		if (_itimediff(sn, snd_una) < 0 || _itimediff(sn, snd_nxt) >= 0)
+		{
 			return;
+		}
 
 		int index = 0;
 		foreach (Segment seg in snd_buf)
@@ -434,13 +493,21 @@ public class Kcp
 	{
 		int count = 0;
 		foreach (Segment seg in snd_buf)
+		{
 			if (_itimediff(una, seg.sn) > 0)
+			{
 				count++;
+			}
 			else
+			{
 				break;
+			}
+		}
 
 		if (0 < count)
-			snd_buf = slice(snd_buf, count, snd_buf.Length);
+		{
+			this.snd_buf = slice(this.snd_buf, count, this.snd_buf.Length);
+		}
 	}
 
 	private void ack_push(UInt32 sn, UInt32 ts)
@@ -458,7 +525,9 @@ public class Kcp
 	{
 		uint sn = newseg.sn;
 		if (_itimediff(sn, rcv_nxt + rcv_wnd) >= 0 || _itimediff(sn, rcv_nxt) < 0)
+		{
 			return;
+		}
 
 		int n = rcv_buf.Length - 1;
 		int after_idx = -1;
@@ -480,15 +549,22 @@ public class Kcp
 		}
 
 		if (!repeat)
+		{
 			if (after_idx == -1)
+			{
 				this.rcv_buf = append(new Segment[1] { newseg }, this.rcv_buf);
+			}
 			else
+			{
 				this.rcv_buf = append(slice(this.rcv_buf, 0, after_idx + 1),
-									  append(new Segment[1] { newseg }, slice(this.rcv_buf, after_idx + 1, this.rcv_buf.Length)));
+				                      append(new Segment[1] { newseg }, slice(this.rcv_buf, after_idx + 1, this.rcv_buf.Length)));
+			}
+		}
 
 		// move available data from rcv_buf -> rcv_queue
 		int count = 0;
 		foreach (Segment seg in rcv_buf)
+		{
 			if (seg.sn == this.rcv_nxt && this.rcv_queue.Length < this.rcv_wnd)
 			{
 				this.rcv_queue = append(this.rcv_queue, seg);
@@ -499,9 +575,12 @@ public class Kcp
 			{
 				break;
 			}
+		}
 
 		if (0 < count)
+		{
 			this.rcv_buf = slice(this.rcv_buf, count, this.rcv_buf.Length);
+		}
 	}
 
 	// when you received a low level packet (eg. UDP packet), call it
@@ -509,7 +588,9 @@ public class Kcp
 	{
 		uint s_una = snd_una;
 		if (data.Length < IKCP_OVERHEAD)
+		{
 			return 0;
+		}
 
 		int offset = 0;
 
@@ -527,7 +608,9 @@ public class Kcp
 			byte frg = 0;
 
 			if (data.Length - offset < IKCP_OVERHEAD)
+			{
 				break;
+			}
 
 			offset += ikcp_decode32u(data, offset, ref conv_);
 
@@ -544,7 +627,9 @@ public class Kcp
 			offset += ikcp_decode32u(data, offset, ref length);
 
 			if (data.Length - offset < length)
+			{
 				return -2;
+			}
 
 			switch (cmd)
 			{
@@ -564,7 +649,10 @@ public class Kcp
 			if (IKCP_CMD_ACK == cmd)
 			{
 				if (_itimediff(current, ts) >= 0)
+				{
 					this.update_ack(_itimediff(this.current, ts));
+				}
+
 				parse_ack(sn);
 				shrink_buf();
 			}
@@ -585,7 +673,9 @@ public class Kcp
 						seg.una = una;
 
 						if (length > 0)
+						{
 							Array.Copy(data, offset, seg.data, 0, length);
+						}
 
 						parse_data(seg);
 					}
@@ -610,6 +700,7 @@ public class Kcp
 		}
 
 		if (_itimediff(snd_una, s_una) > 0)
+		{
 			if (this.cwnd < this.rmt_wnd)
 			{
 				uint mss_ = this.mss;
@@ -621,10 +712,15 @@ public class Kcp
 				else
 				{
 					if (this.incr < mss_)
+					{
 						this.incr = mss_;
+					}
+
 					this.incr += mss_ * mss_ / this.incr + mss_ / 16;
 					if ((this.cwnd + 1) * mss_ <= this.incr)
+					{
 						this.cwnd++;
+					}
 				}
 				if (this.cwnd > this.rmt_wnd)
 				{
@@ -632,6 +728,7 @@ public class Kcp
 					this.incr = this.rmt_wnd * mss_;
 				}
 			}
+		}
 
 		return 0;
 	}
@@ -639,7 +736,10 @@ public class Kcp
 	private Int32 wnd_unused()
 	{
 		if (rcv_queue.Length < rcv_wnd)
-			return (int)this.rcv_wnd - rcv_queue.Length;
+		{
+			return (int)this.rcv_wnd - this.rcv_queue.Length;
+		}
+
 		return 0;
 	}
 
@@ -652,7 +752,9 @@ public class Kcp
 		int lost = 0;
 
 		if (0 == updated)
+		{
 			return;
+		}
 
 		Segment seg = new Segment(0);
 		seg.conv = conv;
@@ -689,10 +791,16 @@ public class Kcp
 				if (_itimediff(current, ts_probe) >= 0)
 				{
 					if (probe_wait < IKCP_PROBE_INIT)
-						probe_wait = IKCP_PROBE_INIT;
+					{
+						this.probe_wait = IKCP_PROBE_INIT;
+					}
+
 					probe_wait += probe_wait / 2;
 					if (probe_wait > IKCP_PROBE_LIMIT)
-						probe_wait = IKCP_PROBE_LIMIT;
+					{
+						this.probe_wait = IKCP_PROBE_LIMIT;
+					}
+
 					ts_probe = current + probe_wait;
 					probe |= IKCP_ASK_SEND;
 				}
@@ -722,13 +830,17 @@ public class Kcp
 		// calculate window size
 		uint cwnd_ = _imin_(snd_wnd, rmt_wnd);
 		if (0 == nocwnd)
-			cwnd_ = _imin_(cwnd, cwnd_);
+		{
+			cwnd_ = _imin_(this.cwnd, cwnd_);
+		}
 
 		count = 0;
 		for (int k = 0; k < snd_queue.Length; k++)
 		{
 			if (_itimediff(snd_nxt, snd_una + cwnd_) >= 0)
+			{
 				break;
+			}
 
 			Segment newseg = snd_queue[k];
 			newseg.conv = conv;
@@ -747,15 +859,22 @@ public class Kcp
 		}
 
 		if (0 < count)
+		{
 			this.snd_queue = slice(this.snd_queue, count, this.snd_queue.Length);
+		}
 
 		// calculate resent
 		uint resent = (UInt32)fastresend;
 		if (fastresend <= 0)
+		{
 			resent = 0xffffffff;
+		}
+
 		uint rtomin = rx_rto >> 3;
 		if (nodelay != 0)
+		{
 			rtomin = 0;
+		}
 
 		// flush data segments
 		foreach (Segment segment in snd_buf)
@@ -775,9 +894,14 @@ public class Kcp
 				segment.xmit++;
 				xmit++;
 				if (0 == nodelay)
-					segment.rto += rx_rto;
+				{
+					segment.rto += this.rx_rto;
+				}
 				else
-					segment.rto += rx_rto / 2;
+				{
+					segment.rto += this.rx_rto / 2;
+				}
+
 				segment.resendts = current_ + segment.rto;
 				lost = 1;
 			}
@@ -812,7 +936,9 @@ public class Kcp
 				}
 
 				if (segment.xmit >= dead_link)
+				{
 					this.state = 0;
+				}
 			}
 		}
 
@@ -830,7 +956,10 @@ public class Kcp
 			uint inflight = snd_nxt - snd_una;
 			ssthresh = inflight / 2;
 			if (ssthresh < IKCP_THRESH_MIN)
-				ssthresh = IKCP_THRESH_MIN;
+			{
+				this.ssthresh = IKCP_THRESH_MIN;
+			}
+
 			cwnd = ssthresh + resent;
 			incr = cwnd * mss;
 		}
@@ -839,7 +968,10 @@ public class Kcp
 		{
 			ssthresh = cwnd / 2;
 			if (ssthresh < IKCP_THRESH_MIN)
-				ssthresh = IKCP_THRESH_MIN;
+			{
+				this.ssthresh = IKCP_THRESH_MIN;
+			}
+
 			cwnd = 1;
 			incr = mss;
 		}
@@ -876,7 +1008,10 @@ public class Kcp
 		{
 			ts_flush += interval;
 			if (_itimediff(current, ts_flush) >= 0)
-				ts_flush = current + interval;
+			{
+				this.ts_flush = this.current + this.interval;
+			}
+
 			flush();
 		}
 	}
@@ -891,7 +1026,9 @@ public class Kcp
 	public UInt32 Check(UInt32 current_)
 	{
 		if (0 == updated)
+		{
 			return current_;
+		}
 
 		uint ts_flush_ = ts_flush;
 		int tm_flush_ = 0x7fffffff;
@@ -899,10 +1036,14 @@ public class Kcp
 		int minimal = 0;
 
 		if (_itimediff(current_, ts_flush_) >= 10000 || _itimediff(current_, ts_flush_) < -10000)
+		{
 			ts_flush_ = current_;
+		}
 
 		if (_itimediff(current_, ts_flush_) >= 0)
+		{
 			return current_;
+		}
 
 		tm_flush_ = _itimediff(ts_flush_, current_);
 
@@ -910,16 +1051,26 @@ public class Kcp
 		{
 			int diff = _itimediff(seg.resendts, current_);
 			if (diff <= 0)
+			{
 				return current_;
+			}
+
 			if (diff < tm_packet)
+			{
 				tm_packet = diff;
+			}
 		}
 
 		minimal = tm_packet;
 		if (tm_packet >= tm_flush_)
+		{
 			minimal = tm_flush_;
+		}
+
 		if (minimal >= interval)
-			minimal = (int)interval;
+		{
+			minimal = (int)this.interval;
+		}
 
 		return current_ + (UInt32)minimal;
 	}
@@ -928,11 +1079,15 @@ public class Kcp
 	public int SetMtu(Int32 mtu_)
 	{
 		if (mtu_ < 50 || mtu_ < IKCP_OVERHEAD)
+		{
 			return -1;
+		}
 
 		var buffer_ = new byte[(mtu_ + IKCP_OVERHEAD) * 3];
 		if (null == buffer_)
+		{
 			return -2;
+		}
 
 		mtu = (UInt32)mtu_;
 		mss = mtu - IKCP_OVERHEAD;
@@ -943,9 +1098,14 @@ public class Kcp
 	public int Interval(Int32 interval_)
 	{
 		if (interval_ > 5000)
+		{
 			interval_ = 5000;
+		}
 		else if (interval_ < 10)
+		{
 			interval_ = 10;
+		}
+
 		interval = (UInt32)interval_;
 		return 0;
 	}
@@ -961,25 +1121,38 @@ public class Kcp
 		{
 			nodelay = (UInt32)nodelay_;
 			if (nodelay_ != 0)
-				rx_minrto = IKCP_RTO_NDL;
+			{
+				this.rx_minrto = IKCP_RTO_NDL;
+			}
 			else
-				rx_minrto = IKCP_RTO_MIN;
+			{
+				this.rx_minrto = IKCP_RTO_MIN;
+			}
 		}
 
 		if (interval_ >= 0)
 		{
 			if (interval_ > 5000)
+			{
 				interval_ = 5000;
+			}
 			else if (interval_ < 10)
+			{
 				interval_ = 10;
+			}
+
 			interval = (UInt32)interval_;
 		}
 
 		if (resend_ >= 0)
-			fastresend = resend_;
+		{
+			this.fastresend = resend_;
+		}
 
 		if (nc_ >= 0)
-			nocwnd = nc_;
+		{
+			this.nocwnd = nc_;
+		}
 
 		return 0;
 	}
@@ -988,10 +1161,15 @@ public class Kcp
 	public int WndSize(int sndwnd, int rcvwnd)
 	{
 		if (sndwnd > 0)
-			snd_wnd = (UInt32)sndwnd;
+		{
+			this.snd_wnd = (UInt32)sndwnd;
+		}
 
 		if (rcvwnd > 0)
-			rcv_wnd = (UInt32)rcvwnd;
+		{
+			this.rcv_wnd = (UInt32)rcvwnd;
+		}
+
 		return 0;
 	}
 

+ 3 - 2
Unity/Unity.Editor.Plugins.csproj

@@ -33,7 +33,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -43,7 +43,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
@@ -169,6 +169,7 @@
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\GlobalProto.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Version.txt" />
     <None Include="Assets\link.xml" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 2
Unity/Unity.Editor.csproj

@@ -33,7 +33,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -43,7 +43,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
@@ -236,6 +236,7 @@
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\GlobalProto.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Version.txt" />
     <None Include="Assets\link.xml" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 2
Unity/Unity.Plugins.csproj

@@ -33,7 +33,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -43,7 +43,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
@@ -433,6 +433,7 @@
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\GlobalProto.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Version.txt" />
     <None Include="Assets\link.xml" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

+ 3 - 2
Unity/Unity.csproj

@@ -33,7 +33,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -43,7 +43,7 @@
     <IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45;ILRuntime</DefineConstants>
+    <DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_3;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;NET45</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <ItemGroup>
@@ -769,6 +769,7 @@
     <None Include="Assets\Res\Config\BuffConfig.txt" />
     <None Include="Assets\Res\Config\GlobalProto.txt" />
     <None Include="Assets\Res\Config\UnitConfig.txt" />
+    <None Include="Assets\StreamingAssets\Version.txt" />
     <None Include="Assets\link.xml" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />