Przeglądaj źródła

1.增加一个Hotfix对象,用来处理客户端热更入口,挂在Game对象上面
2.调整module下文件的位置,文件位置更加合理

tanghai 8 lat temu
rodzic
commit
a8efa5515f
100 zmienionych plików z 544 dodań i 942 usunięć
  1. 1 1
      Server/Hotfix/Module/Network/InnerMessageDispatcher.cs
  2. 1 1
      Server/Hotfix/Module/Network/OuterMessageDispatcher.cs
  3. 0 15
      Server/Model/Base/Event/AEventAttribute.cs
  4. 0 91
      Server/Model/Base/Event/Env.cs
  5. 0 10
      Server/Model/Base/Event/EnvKey.cs
  6. 0 9
      Server/Model/Base/Event/EventAttribute.cs
  7. 2 15
      Server/Model/Base/Event/EventIdType.cs
  8. 0 37
      Server/Model/Base/Event/IEvent.cs
  9. 0 426
      Server/Model/Base/Object/EventSystem.cs
  10. 38 0
      Server/Model/Message/InnerOpcode.cs
  11. 0 0
      Server/Model/Module/Message/AMRpcHandler.cs
  12. 0 0
      Server/Model/Module/Message/NetInnerComponent.cs
  13. 0 0
      Server/Model/Module/Message/NetOuterComponent.cs
  14. 0 0
      Server/Model/Module/Message/OpcodeHelper.cs
  15. 43 36
      Server/Model/Server.Model.csproj
  16. 239 54
      Unity/Assets/Plugins/Editor/JetBrains/Unity3DRider.cs
  17. 2 0
      Unity/Assets/Scripts/Base/Event/Env.cs
  18. 2 2
      Unity/Assets/Scripts/Base/Event/Env.cs.meta
  19. 34 32
      Unity/Assets/Scripts/Base/Object/EventSystem.cs
  20. 30 15
      Unity/Assets/Scripts/Base/Object/IAwake.cs
  21. 1 1
      Unity/Assets/Scripts/Component/ClientFrameComponent.cs
  22. 11 0
      Unity/Assets/Scripts/Entity/Game.cs
  23. 83 0
      Unity/Assets/Scripts/Entity/Hotfix.cs
  24. 2 2
      Unity/Assets/Scripts/Entity/Hotfix.cs.meta
  25. 0 54
      Unity/Assets/Scripts/Entity/Message/Opcode.cs
  26. 1 66
      Unity/Assets/Scripts/Helper/DllHelper.cs
  27. 12 12
      Unity/Assets/Scripts/Helper/ILHelper.cs
  28. 4 47
      Unity/Assets/Scripts/Init.cs
  29. 0 0
      Unity/Assets/Scripts/Message.meta
  30. 0 0
      Unity/Assets/Scripts/Message/OuterMessage.cs
  31. 0 0
      Unity/Assets/Scripts/Message/OuterMessage.cs.meta
  32. 22 0
      Unity/Assets/Scripts/Message/OuterOpcode.cs
  33. 0 0
      Unity/Assets/Scripts/Message/OuterOpcode.cs.meta
  34. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree.meta
  35. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BTEnv.cs
  36. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BTEnv.cs.meta
  37. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BTEnvKey.cs
  38. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BTEnvKey.cs.meta
  39. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorNodeConfig.cs
  40. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorNodeConfig.cs.meta
  41. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTree.cs
  42. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTree.cs.meta
  43. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeArgsDict.cs
  44. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeArgsDict.cs.meta
  45. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeComponent.cs
  46. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeComponent.cs.meta
  47. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeConfig.cs
  48. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeConfig.cs.meta
  49. 2 2
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType.meta
  50. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs
  51. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs.meta
  52. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeManager.cs
  53. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeManager.cs.meta
  54. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType.meta
  55. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs
  56. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs.meta
  57. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs
  58. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs.meta
  59. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs
  60. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs.meta
  61. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs
  62. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs.meta
  63. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs
  64. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs.meta
  65. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs
  66. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs.meta
  67. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs
  68. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs.meta
  69. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs
  70. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs.meta
  71. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs
  72. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs.meta
  73. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs
  74. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs.meta
  75. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs
  76. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs.meta
  77. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs
  78. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs.meta
  79. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType.meta
  80. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs
  81. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs.meta
  82. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs
  83. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs.meta
  84. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs
  85. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs.meta
  86. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs
  87. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs.meta
  88. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs
  89. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs.meta
  90. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs
  91. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs.meta
  92. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs
  93. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs.meta
  94. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs
  95. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs.meta
  96. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs
  97. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs.meta
  98. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs
  99. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs.meta
  100. 0 0
      Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTMaterialComponent.cs

+ 1 - 1
Server/Hotfix/Module/Network/InnerMessageDispatcher.cs

@@ -28,7 +28,7 @@ namespace Hotfix
 				return;
 			}
 			
-			Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, packetInfo.RpcId, new MessageInfo(packetInfo.Opcode, message));
+			Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, new MessageInfo(packetInfo.RpcId, packetInfo.Opcode, message));
 		}
 	}
 }

+ 1 - 1
Server/Hotfix/Module/Network/OuterMessageDispatcher.cs

@@ -31,7 +31,7 @@ namespace Hotfix
 
 			if (message != null)
 			{
-				Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, packetInfo.RpcId, new MessageInfo(packetInfo.Opcode, message));
+				Game.Scene.GetComponent<MessageDispatherComponent>().Handle(session, new MessageInfo(packetInfo.RpcId, packetInfo.Opcode, message));
 				return;
 			}
 

+ 0 - 15
Server/Model/Base/Event/AEventAttribute.cs

@@ -1,15 +0,0 @@
-using System;
-
-namespace Model
-{
-	[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-	public abstract class AEventAttribute: Attribute
-	{
-		public int Type { get; private set; }
-
-		protected AEventAttribute(int type)
-		{
-			this.Type = type;
-		}
-	}
-}

+ 0 - 91
Server/Model/Base/Event/Env.cs

@@ -1,91 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using MongoDB.Bson.Serialization.Attributes;
-
-namespace Model
-{
-	public class Env
-	{
-		[BsonElement, BsonIgnoreIfNull]
-		private Dictionary<EnvKey, object> values = new Dictionary<EnvKey, object>();
-
-		public object this[EnvKey key]
-		{
-			get
-			{
-				return this.values[key];
-			}
-			set
-			{
-				if (this.values == null)
-				{
-					this.values = new Dictionary<EnvKey, object>();
-				}
-				this.values[key] = value;
-			}
-		}
-
-		public T Get<T>(EnvKey key)
-		{
-			if (this.values == null || !this.values.ContainsKey(key))
-			{
-				return default(T);
-			}
-			object value = values[key];
-			try
-			{
-				return (T) value;
-			}
-			catch (InvalidCastException e)
-			{
-				throw new Exception($"不能把{value.GetType()}转换为{typeof (T)}", e);
-			}
-		}
-
-		public void Set(EnvKey key, object obj)
-		{
-			if (this.values == null)
-			{
-				this.values = new Dictionary<EnvKey, object>();
-			}
-			this.values[key] = obj;
-		}
-
-		public bool ContainKey(EnvKey key)
-		{
-			if (this.values == null)
-			{
-				return false;
-			}
-			return this.values.ContainsKey(key);
-		}
-
-		public void Remove(EnvKey key)
-		{
-			if (this.values == null)
-			{
-				return;
-			}
-			this.values.Remove(key);
-			if (this.values.Count == 0)
-			{
-				this.values = null;
-			}
-		}
-
-		public void Add(EnvKey key, object value)
-		{
-			if (this.values == null)
-			{
-				this.values = new Dictionary<EnvKey, object>();
-			}
-			this.values[key] = value;
-		}
-
-		public IEnumerator GetEnumerator()
-		{
-			return this.values.GetEnumerator();
-		}
-	}
-}

+ 0 - 10
Server/Model/Base/Event/EnvKey.cs

@@ -1,10 +0,0 @@
-namespace Model
-{
-	/// <summary>
-	/// 一般使用事件名+变量名
-	/// </summary>
-	public enum EnvKey
-	{
-		ChannelError
-	}
-}

+ 0 - 9
Server/Model/Base/Event/EventAttribute.cs

@@ -1,9 +0,0 @@
-namespace Model
-{
-	public class EventAttribute: AEventAttribute
-	{
-		public EventAttribute(int type): base(type)
-		{
-		}
-	}
-}

+ 2 - 15
Server/Model/Base/Event/EventIdType.cs

@@ -1,20 +1,7 @@
 namespace Model
 {
-	public enum EventIdType
+	public static class EventIdType
 	{
-		InitSceneStart,
-
-		BehaviorTreeRunTreeEvent,
-		BehaviorTreeOpenEditor,
-		BehaviorTreeClickNode,
-		BehaviorTreeAfterChangeNodeType,
-		BehaviorTreeCreateNode,
-		BehaviorTreePropertyDesignerNewCreateClick,
-		BehaviorTreeMouseInNode,
-		BehaviorTreeConnectState,
-		BehaviorTreeReplaceClick,
-		BehaviorTreeRightDesignerDrag,
-
-		NumbericChange,
+		public const int NumbericChange = 0;
 	}
 }

+ 0 - 37
Server/Model/Base/Event/IEvent.cs

@@ -1,37 +0,0 @@
-namespace Model
-{
-	public interface IEvent
-	{
-		void Run();
-	}
-
-	public interface IEvent<in A>
-	{
-		void Run(A uid);
-	}
-
-	public interface IEvent<in A, in B>
-	{
-		void Run(A a, B b);
-	}
-
-	public interface IEvent<in A, in B, in C>
-	{
-		void Run(A a, B b, C c);
-	}
-
-	public interface IEvent<in A, in B, in C, in D>
-	{
-		void Run(A a, B b, C c, D d);
-	}
-
-	public interface IEvent<in A, in B, in C, in D, in E>
-	{
-		void Run(A a, B b, C c, D d, E e);
-	}
-
-	public interface IEvent<in A, in B, in C, in D, in E, in F>
-	{
-		void Run(A a, B b, C c, D d, E e, F f);
-	}
-}

+ 0 - 426
Server/Model/Base/Object/EventSystem.cs

@@ -1,426 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-
-namespace Model
-{
-	public enum DLLType
-	{
-		Model,
-		Hotfix,
-		Editor,
-	}
-
-	public sealed class EventSystem
-	{
-		private readonly Dictionary<DLLType, Assembly> assemblies = new Dictionary<DLLType, Assembly>();
-
-		private readonly Dictionary<EventIdType, List<object>> allEvents = new Dictionary<EventIdType, List<object>>();
-
-		private readonly UnOrderMultiMap<Type, AAwakeSystem> awakeEvents = new UnOrderMultiMap<Type, AAwakeSystem>();
-
-		private readonly UnOrderMultiMap<Type, AStartSystem> startEvents = new UnOrderMultiMap<Type, AStartSystem>();
-
-		private readonly UnOrderMultiMap<Type, ALoadSystem> loadEvents = new UnOrderMultiMap<Type, ALoadSystem>();
-
-		private readonly UnOrderMultiMap<Type, AUpdateSystem> updateEvents = new UnOrderMultiMap<Type, AUpdateSystem>();
-
-		private readonly UnOrderMultiMap<Type, ALateUpdateSystem> lateUpdateEvents = new UnOrderMultiMap<Type, ALateUpdateSystem>();
-
-		private Queue<Component> updates = new Queue<Component>();
-		private Queue<Component> updates2 = new Queue<Component>();
-
-		private readonly Queue<Component> starts = new Queue<Component>();
-
-		private Queue<Component> loaders = new Queue<Component>();
-		private Queue<Component> loaders2 = new Queue<Component>();
-
-		private readonly HashSet<Disposer> unique = new HashSet<Disposer>();
-
-		public void Add(DLLType dllType, Assembly assembly)
-		{
-			this.assemblies[dllType] = assembly;
-
-			this.awakeEvents.Clear();
-			this.lateUpdateEvents.Clear();
-			this.updateEvents.Clear();
-			this.startEvents.Clear();
-			this.loadEvents.Clear();
-			
-			Type[] types = DllHelper.GetMonoTypes();
-			foreach (Type type in types)
-			{
-				object[] attrs = type.GetCustomAttributes(typeof(ObjectSystemAttribute), false);
-
-				if (attrs.Length == 0)
-				{
-					continue;
-				}
-
-				object obj = Activator.CreateInstance(type);
-
-				AAwakeSystem objectSystem = obj as AAwakeSystem;
-				if (objectSystem != null)
-				{
-					this.awakeEvents.Add(objectSystem.Type(), objectSystem);
-				}
-
-				AUpdateSystem aUpdateSystem = obj as AUpdateSystem;
-				if (aUpdateSystem != null)
-				{
-					this.updateEvents.Add(aUpdateSystem.Type(), aUpdateSystem);
-				}
-
-				ALateUpdateSystem aLateUpdateSystem = obj as ALateUpdateSystem;
-				if (aLateUpdateSystem != null)
-				{
-					this.lateUpdateEvents.Add(aLateUpdateSystem.Type(), aLateUpdateSystem);
-				}
-
-				AStartSystem aStartSystem = obj as AStartSystem;
-				if (aStartSystem != null)
-				{
-					this.startEvents.Add(aStartSystem.Type(), aStartSystem);
-				}
-
-				ALoadSystem aLoadSystem = obj as ALoadSystem;
-				if (aLoadSystem != null)
-				{
-					this.loadEvents.Add(aLoadSystem.Type(), aLoadSystem);
-				}
-			}
-
-
-			allEvents.Clear();
-			foreach (Type type in types)
-			{
-				object[] attrs = type.GetCustomAttributes(typeof(EventAttribute), false);
-
-				foreach (object attr in attrs)
-				{
-					EventAttribute aEventAttribute = (EventAttribute)attr;
-					object obj = Activator.CreateInstance(type);
-					if (!this.allEvents.ContainsKey((EventIdType)aEventAttribute.Type))
-					{
-						this.allEvents.Add((EventIdType)aEventAttribute.Type, new List<object>());
-					}
-					this.allEvents[(EventIdType)aEventAttribute.Type].Add(obj);
-				}
-			}
-
-			this.Load();
-		}
-
-		public Assembly Get(DLLType dllType)
-		{
-			return this.assemblies[dllType];
-		}
-
-		public Assembly[] GetAll()
-		{
-			return this.assemblies.Values.ToArray();
-		}
-
-		public void Add(Component disposer)
-		{
-			Type type = disposer.GetType();
-
-			if (this.loadEvents.ContainsKey(type))
-			{
-				this.loaders.Enqueue(disposer);
-			}
-
-			if (this.updateEvents.ContainsKey(type))
-			{
-				this.updates.Enqueue(disposer);
-			}
-
-			if (this.startEvents.ContainsKey(type))
-			{
-				this.starts.Enqueue(disposer);
-			}
-		}
-
-		public void Awake(Component disposer)
-		{
-			this.Add(disposer);
-
-			List<AAwakeSystem> iAwakeSystems = this.awakeEvents[disposer.GetType()];
-			if (iAwakeSystems == null)
-			{
-				return;
-			}
-
-			foreach (AAwakeSystem aAwakeSystem in iAwakeSystems)
-			{
-				if (aAwakeSystem == null)
-				{
-					continue;
-				}
-				aAwakeSystem.Run(disposer);
-			}
-		}
-
-		public void Awake<P1>(Component disposer, P1 p1)
-		{
-			this.Add(disposer);
-
-			List<AAwakeSystem> iAwakeSystems = this.awakeEvents[disposer.GetType()];
-			if (iAwakeSystems == null)
-			{
-				return;
-			}
-
-			foreach (AAwakeSystem aAwakeSystem in iAwakeSystems)
-			{
-				if (aAwakeSystem == null)
-				{
-					continue;
-				}
-				aAwakeSystem.Run(disposer, p1);
-			}
-		}
-
-		public void Awake<P1, P2>(Component disposer, P1 p1, P2 p2)
-		{
-			this.Add(disposer);
-
-			List<AAwakeSystem> iAwakeSystems = this.awakeEvents[disposer.GetType()];
-			if (iAwakeSystems == null)
-			{
-				return;
-			}
-
-			foreach (AAwakeSystem aAwakeSystem in iAwakeSystems)
-			{
-				if (aAwakeSystem == null)
-				{
-					continue;
-				}
-				aAwakeSystem.Run(disposer, p1, p2);
-			}
-		}
-
-		public void Awake<P1, P2, P3>(Component disposer, P1 p1, P2 p2, P3 p3)
-		{
-			this.Add(disposer);
-
-			List<AAwakeSystem> iAwakeSystems = this.awakeEvents[disposer.GetType()];
-			if (iAwakeSystems == null)
-			{
-				return;
-			}
-
-			foreach (AAwakeSystem aAwakeSystem in iAwakeSystems)
-			{
-				if (aAwakeSystem == null)
-				{
-					continue;
-				}
-				aAwakeSystem.Run(disposer, p1, p2, p3);
-			}
-		}
-
-		public void Load()
-		{
-			unique.Clear();
-			while (this.loaders.Count > 0)
-			{
-				Component disposer = this.loaders.Dequeue();
-				if (disposer.IsDisposed)
-				{
-					continue;
-				}
-
-				if (!this.unique.Add(disposer))
-				{
-					continue;
-				}
-
-				List<ALoadSystem> aLoadSystems = this.loadEvents[disposer.GetType()];
-				if (aLoadSystems == null)
-				{
-					continue;
-				}
-
-				this.loaders2.Enqueue(disposer);
-
-				foreach (ALoadSystem aLoadSystem in aLoadSystems)
-				{
-					try
-					{
-						aLoadSystem.Run(disposer);
-					}
-					catch (Exception e)
-					{
-						Log.Error(e.ToString());
-					}
-				}
-			}
-
-			ObjectHelper.Swap(ref this.loaders, ref this.loaders2);
-		}
-
-		private void Start()
-		{
-			unique.Clear();
-			while (this.starts.Count > 0)
-			{
-				Component disposer = this.starts.Dequeue();
-
-				if (!this.unique.Add(disposer))
-				{
-					continue;
-				}
-
-				List<AStartSystem> aStartSystems = this.startEvents[disposer.GetType()];
-				if (aStartSystems == null)
-				{
-					continue;
-				}
-
-				foreach (AStartSystem aStartSystem in aStartSystems)
-				{
-					try
-					{
-						aStartSystem.Run(disposer);
-					}
-					catch (Exception e)
-					{
-						Log.Error(e.ToString());
-					}
-				}
-			}
-		}
-
-		public void Update()
-		{
-			this.Start();
-
-			this.unique.Clear();
-			while (this.updates.Count > 0)
-			{
-				Component disposer = this.updates.Dequeue();
-				if (disposer.IsDisposed)
-				{
-					continue;
-				}
-
-				if (!this.unique.Add(disposer))
-				{
-					continue;
-				}
-
-				List<AUpdateSystem> aUpdateSystems = this.updateEvents[disposer.GetType()];
-				if (aUpdateSystems == null)
-				{
-					continue;
-				}
-
-				this.updates2.Enqueue(disposer);
-
-				foreach (AUpdateSystem aUpdateSystem in aUpdateSystems)
-				{
-					try
-					{
-						aUpdateSystem.Run(disposer);
-					}
-					catch (Exception e)
-					{
-						Log.Error(e.ToString());
-					}
-				}
-			}
-
-			ObjectHelper.Swap(ref this.updates, ref this.updates2);
-		}
-
-		public void Run(EventIdType type)
-		{
-			List<object> iEvents;
-			if (!this.allEvents.TryGetValue(type, out iEvents))
-			{
-				return;
-			}
-			foreach (object obj in iEvents)
-			{
-				try
-				{
-					IEvent iEvent = (IEvent)obj;
-					iEvent.Run();
-				}
-				catch (Exception e)
-				{
-					Log.Error(e.ToString());
-				}
-			}
-		}
-
-		public void Run<A>(EventIdType type, A a)
-		{
-			List<object> iEvents;
-			if (!this.allEvents.TryGetValue(type, out iEvents))
-			{
-				return;
-			}
-
-			foreach (object obj in iEvents)
-			{
-				try
-				{
-					IEvent<A> iEvent = (IEvent<A>)obj;
-					iEvent.Run(a);
-				}
-				catch (Exception err)
-				{
-					Log.Error(err.ToString());
-				}
-			}
-		}
-
-		public void Run<A, B>(EventIdType type, A a, B b)
-		{
-			List<object> iEvents;
-			if (!this.allEvents.TryGetValue(type, out iEvents))
-			{
-				return;
-			}
-
-			foreach (object obj in iEvents)
-			{
-				try
-				{
-					IEvent<A, B> iEvent = (IEvent<A, B>)obj;
-					iEvent.Run(a, b);
-				}
-				catch (Exception err)
-				{
-					Log.Error(err.ToString());
-				}
-			}
-		}
-
-		public void Run<A, B, C>(EventIdType type, A a, B b, C c)
-		{
-			List<object> iEvents;
-			if (!this.allEvents.TryGetValue(type, out iEvents))
-			{
-				return;
-			}
-
-			foreach (object obj in iEvents)
-			{
-				try
-				{
-					IEvent<A, B, C> iEvent = (IEvent<A, B, C>)obj;
-					iEvent.Run(a, b, c);
-				}
-				catch (Exception err)
-				{
-					Log.Error(err.ToString());
-				}
-			}
-		}
-	}
-}

+ 38 - 0
Server/Model/Message/InnerOpcode.cs

@@ -0,0 +1,38 @@
+namespace Model
+{
+	public static partial class Opcode
+	{
+	    public const ushort M2M_TrasferUnitRequest = 2005;
+	    public const ushort M2M_TrasferUnitResponse = 2006;
+	    public const ushort M2A_Reload = 2007;
+	    public const ushort A2M_Reload = 2008;
+	    public const ushort G2G_LockRequest = 2009;
+	    public const ushort G2G_LockResponse = 2010;
+	    public const ushort G2G_LockReleaseRequest = 2011;
+	    public const ushort G2G_LockReleaseResponse = 2012;
+	    public const ushort DBSaveRequest = 2013;
+	    public const ushort DBSaveBatchResponse = 2014;
+	    public const ushort DBSaveBatchRequest = 2015;
+	    public const ushort DBSaveResponse = 2016;
+	    public const ushort DBQueryRequest = 2017;
+	    public const ushort DBQueryResponse = 2018;
+	    public const ushort DBQueryBatchRequest = 2019;
+	    public const ushort DBQueryBatchResponse = 2020;
+	    public const ushort DBQueryJsonRequest = 2021;
+	    public const ushort DBQueryJsonResponse = 2022;
+	    public const ushort ObjectAddRequest = 2023;
+	    public const ushort ObjectAddResponse = 2024;
+	    public const ushort ObjectRemoveRequest = 2025;
+	    public const ushort ObjectRemoveResponse = 2026;
+	    public const ushort ObjectLockRequest = 2027;
+	    public const ushort ObjectLockResponse = 2028;
+	    public const ushort ObjectUnLockRequest = 2029;
+	    public const ushort ObjectUnLockResponse = 2030;
+	    public const ushort ObjectGetRequest = 2031;
+	    public const ushort ObjectGetResponse = 2032;
+	    public const ushort R2G_GetLoginKey = 2033;
+	    public const ushort G2R_GetLoginKey = 2034;
+	    public const ushort G2M_CreateUnit = 2035;
+	    public const ushort M2G_CreateUnit = 2036;
+	}
+}

+ 0 - 0
Server/Model/Module/Network/AMRpcHandler.cs → Server/Model/Module/Message/AMRpcHandler.cs


+ 0 - 0
Server/Model/Module/Network/NetInnerComponent.cs → Server/Model/Module/Message/NetInnerComponent.cs


+ 0 - 0
Server/Model/Module/Network/NetOuterComponent.cs → Server/Model/Module/Message/NetOuterComponent.cs


+ 0 - 0
Server/Model/Module/Network/OpcodeHelper.cs → Server/Model/Module/Message/OpcodeHelper.cs


+ 43 - 36
Server/Model/Server.Model.csproj

@@ -22,6 +22,11 @@
 
   <ItemGroup>
     <Compile Include="..\..\Unity\Assets\Scripts\Base\DoubleMap.cs" Link="Base\DoubleMap.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Event\AEventAttribute.cs" Link="Base\Event\AEventAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Event\Env.cs" Link="Base\Event\Env.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Event\EnvKey.cs" Link="Base\Event\EnvKey.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Event\EventAttribute.cs" Link="Base\Event\EventAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Event\IEvent.cs" Link="Base\Event\IEvent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ArrayHelper.cs" Link="Base\Helper\ArrayHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ByteHelper.cs" Link="Base\Helper\ByteHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\EnumHelper.cs" Link="Base\Helper\EnumHelper.cs" />
@@ -37,20 +42,11 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\TimeHelper.cs" Link="Base\Helper\TimeHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ZipHelper.cs" Link="Base\Helper\ZipHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\MultiMap.cs" Link="Base\MultiMap.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AChannel.cs" Link="Base\Network\AChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AService.cs" Link="Base\Network\AService.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\Circularbuffer.cs" Link="Base\Network\Circularbuffer.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KChannel.cs" Link="Base\Network\KNet\KChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\Kcp.cs" Link="Base\Network\KNet\Kcp.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KService.cs" Link="Base\Network\KNet\KService.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\NetworkHelper.cs" Link="Base\Network\NetworkHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\PacketParser.cs" Link="Base\Network\TNet\PacketParser.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TChannel.cs" Link="Base\Network\TNet\TChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TService.cs" Link="Base\Network\TNet\TService.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Component.cs" Link="Base\Object\Component.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentFactory.cs" Link="Base\Object\ComponentFactory.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Disposer.cs" Link="Base\Object\Disposer.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Entity.cs" Link="Base\Object\Entity.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\EventSystem.cs" Link="Base\Object\EventSystem.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\IAwake.cs" Link="Base\Object\IAwake.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILateUpdate.cs" Link="Base\Object\ILateUpdate.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ILoad.cs" Link="Base\Object\ILoad.cs" />
@@ -67,38 +63,49 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\ClientConfig.cs" Link="Component\Config\ClientConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\DBConfig.cs" Link="Module\DB\DBConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\HttpConfig.cs" Link="Module\Http\HttpConfig.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\InnerConfig.cs" Link="Module\Network\InnerConfig.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\OuterConfig.cs" Link="Module\Network\OuterConfig.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\InnerConfig.cs" Link="Module\Message\InnerConfig.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\OuterConfig.cs" Link="Module\Message\OuterConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\TimerComponent.cs" Link="Component\TimerComponent.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\Opcode.cs" Link="Message\Opcode.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\OuterMessage.cs" Link="Message\OuterMessage.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Session.cs" Link="Module\Network\Session.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Session.cs" Link="Module\Message\Session.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Helper\SessionHelper.cs" Link="Base\Helper\SessionHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\AMHandler.cs" Link="Module\Network\AMHandler.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\ErrorCode.cs" Link="Module\Network\ErrorCode.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\IActorMessage.cs" Link="Module\Network\IActorMessage.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\IMessage.cs" Link="Module\Network\IMessage.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\IMessageDispatcher.cs" Link="Module\Network\IMessageDispatcher.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\IMessagePacker.cs" Link="Module\Network\IMessagePacker.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\IMHandler.cs" Link="Module\Network\IMHandler.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\MessageAttribute.cs" Link="Module\Network\MessageAttribute.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\MessageDispatherComponent.cs" Link="Module\Network\MessageDispatherComponent.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\MessageHandlerAttribute.cs" Link="Module\Network\MessageHandlerAttribute.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\MessageInfo.cs" Link="Module\Network\MessageInfo.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\MongoPacker.cs" Link="Module\Network\MongoPacker.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\NetworkComponent.cs" Link="Module\Network\NetworkComponent.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\Opcode.cs" Link="Module\Network\Opcode.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\OpcodeTypeComponent.cs" Link="Module\Network\OpcodeTypeComponent.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\ProtobufPacker.cs" Link="Module\Network\ProtobufPacker.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Module\Network\RpcException.cs" Link="Module\Network\RpcException.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Message\OuterMessage.cs" Link="Message\OuterMessage.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Message\OuterOpcode.cs" Link="Message\OuterOpcode.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\AMHandler.cs" Link="Module\Message\AMHandler.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\ErrorCode.cs" Link="Module\Message\ErrorCode.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\IActorMessage.cs" Link="Module\Message\IActorMessage.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\IMessage.cs" Link="Module\Message\IMessage.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\IMessageDispatcher.cs" Link="Module\Message\IMessageDispatcher.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\IMessagePacker.cs" Link="Module\Message\IMessagePacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\IMHandler.cs" Link="Module\Message\IMHandler.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\MessageAttribute.cs" Link="Module\Message\MessageAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\MessageDispatherComponent.cs" Link="Module\Message\MessageDispatherComponent.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\MessageHandlerAttribute.cs" Link="Module\Message\MessageHandlerAttribute.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\MessageInfo.cs" Link="Module\Message\MessageInfo.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\MongoPacker.cs" Link="Module\Message\MongoPacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\NetworkComponent.cs" Link="Module\Message\NetworkComponent.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\AChannel.cs" Link="Module\Message\Network\AChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\AService.cs" Link="Module\Message\Network\AService.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\Circularbuffer.cs" Link="Module\Message\Network\Circularbuffer.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\KCP\KChannel.cs" Link="Module\Message\Network\KCP\KChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\KCP\Kcp.cs" Link="Module\Message\Network\KCP\Kcp.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\KCP\KService.cs" Link="Module\Message\Network\KCP\KService.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\NetworkHelper.cs" Link="Module\Message\Network\NetworkHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\TCP\PacketParser.cs" Link="Module\Message\Network\TCP\PacketParser.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\TCP\TChannel.cs" Link="Module\Message\Network\TCP\TChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Network\TCP\TService.cs" Link="Module\Message\Network\TCP\TService.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\Opcode.cs" Link="Module\Message\Opcode.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\OpcodeTypeComponent.cs" Link="Module\Message\OpcodeTypeComponent.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\ProtobufPacker.cs" Link="Module\Message\ProtobufPacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Message\RpcException.cs" Link="Module\Message\RpcException.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\INumericWatcher.cs" Link="Module\Numeric\INumericWatcher.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\NumericChangeEvent_NotifyWatcher.cs" Link="Module\Numeric\NumericChangeEvent_NotifyWatcher.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\NumericComponent.cs" Link="Module\Numeric\NumericComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\NumericType.cs" Link="Module\Numeric\NumericType.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\NumericWatcherAttribute.cs" Link="Module\Numeric\NumericWatcherAttribute.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Module\Numeric\NumericWatcherComponent.cs" Link="Module\Numeric\NumericWatcherComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Other\AppType.cs" Link="Other\AppType.cs" />
-    <Compile Include="..\..\Unity\Hotfix\Module\HotfixMessage\HotfixMessage.cs" Link="Message\HotfixMessage.cs" />
-    <Compile Include="..\..\Unity\Hotfix\Module\HotfixMessage\HotfixOpcode.cs" Link="Message\HotfixOpcode.cs" />
+    <Compile Include="..\..\Unity\Hotfix\Module\Message\HotfixMessage.cs" Link="Message\HotfixMessage.cs" />
+    <Compile Include="..\..\Unity\Hotfix\Module\Message\HotfixOpcode.cs" Link="Message\HotfixOpcode.cs" />
   </ItemGroup>
 
   <ItemGroup>
@@ -115,9 +122,9 @@
   </ItemGroup>
 
   <ItemGroup>
-    <Folder Include="Base\Network\KNet\" />
-    <Folder Include="Base\Network\TNet\" />
     <Folder Include="Component\Config\" />
+    <Folder Include="Module\Message\Network\KCP\" />
+    <Folder Include="Module\Message\Network\TCP\" />
     <Folder Include="Module\Numeric\" />
   </ItemGroup>
 </Project>

+ 239 - 54
Unity/Assets/Plugins/Editor/JetBrains/Unity3DRider.cs

@@ -1,7 +1,7 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     This code was generated by a tool.
-//     Version: 2.1.2.1737
+//     Version: 2.1.3.4269
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
 //     the code is regenerated.
@@ -14,6 +14,7 @@ using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Net;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using System.Text.RegularExpressions;
@@ -39,10 +40,21 @@ namespace Plugins.Editor.JetBrains
         UpgradeProjectFile(file);
       }
 
-      var slnFile = Directory.GetFiles(currentDirectory, "*.sln").First();
+      var slnFile = Directory.GetFiles(currentDirectory, "*.sln").FirstOrDefault();
+      if (string.IsNullOrEmpty(slnFile))
+        return;
+      
       RiderPlugin.Log(RiderPlugin.LoggingLevel.Verbose, string.Format("Post-processing {0}", slnFile));
-      string content = File.ReadAllText(slnFile);
-      var lines = content.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
+      string slnAllText = File.ReadAllText(slnFile);
+      const string unityProjectGuid = @"Project(""{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1}"")";
+      if (!slnAllText.Contains(unityProjectGuid))
+      {
+        string matchGUID = @"Project\(\""\{[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\}\""\)";
+        // Unity may put a random guid, unityProjectGuid will help VSTU recognize Rider-generated projects
+        slnAllText = Regex.Replace(slnAllText, matchGUID, unityProjectGuid);
+      }
+
+      var lines = slnAllText.Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
       var sb = new StringBuilder();
       foreach (var line in lines)
       {
@@ -86,9 +98,8 @@ namespace Plugins.Editor.JetBrains
       FixSystemXml(projectContentElement, xmlns);
       SetLangVersion(projectContentElement, xmlns);
       // Unity_5_6_OR_NEWER switched to nunit 3.5
-      // Fix helps only for Windows, on mac and linux I get https://youtrack.jetbrains.com/issue/RSRP-459932
-#if UNITY_5_6_OR_NEWER && UNITY_STANDALONE_WIN
-      ChangeNunitReference(new FileInfo(projectFile).DirectoryName, projectContentElement, xmlns);
+#if UNITY_5_6_OR_NEWER 
+      ChangeNunitReference(projectContentElement, xmlns);
 #endif
       
 #if !UNITY_2017_1_OR_NEWER // Unity 2017.1 and later has this features by itself 
@@ -96,6 +107,7 @@ namespace Plugins.Editor.JetBrains
       SetXCodeDllReference("UnityEditor.iOS.Extensions.Xcode.dll", xmlns, projectContentElement);
       SetXCodeDllReference("UnityEditor.iOS.Extensions.Common.dll", xmlns, projectContentElement);
 #endif
+      ApplyManualCompilingSettingsReferences(projectContentElement, xmlns);
       doc.Save(projectFile);
     }
     
@@ -111,7 +123,7 @@ namespace Plugins.Editor.JetBrains
       }
     }
 
-    private static void ChangeNunitReference(string baseDir, XElement projectContentElement, XNamespace xmlns)
+    private static void ChangeNunitReference(XElement projectContentElement, XNamespace xmlns)
     {
       var el = projectContentElement
         .Elements(xmlns+"ItemGroup")
@@ -122,20 +134,20 @@ namespace Plugins.Editor.JetBrains
         var hintPath = el.Elements(xmlns + "HintPath").FirstOrDefault();
         if (hintPath != null)
         {
-          string unityAppBaseFolder = Path.GetDirectoryName(EditorApplication.applicationPath);
-          var path = Path.Combine(unityAppBaseFolder, "Data/Managed/nunit.framework.dll");
+          var projectDirectory = Directory.GetParent(Application.dataPath).FullName;
+          var path = Path.Combine(projectDirectory, "Library/resharper-unity-libs/nunit3.5.0/nunit.framework.dll");
           if (new FileInfo(path).Exists)
             hintPath.Value = path;
         }
       }
     }
 
+    private static readonly string  PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH = Path.Combine(UnityEngine.Application.dataPath, "mcs.rsp");
 #if !UNITY_2017_1_OR_NEWER  // Unity 2017.1 and later has this features by itself
     private const string UNITY_PLAYER_PROJECT_NAME = "Assembly-CSharp.csproj";
     private const string UNITY_EDITOR_PROJECT_NAME = "Assembly-CSharp-Editor.csproj";
     private const string UNITY_UNSAFE_KEYWORD = "-unsafe";
     private const string UNITY_DEFINE_KEYWORD = "-define:";
-    private static readonly string  PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH = Path.Combine(UnityEngine.Application.dataPath, "mcs.rsp");
     private static readonly string  PLAYER_PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH = Path.Combine(UnityEngine.Application.dataPath, "smcs.rsp");
     private static readonly string  EDITOR_PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH = Path.Combine(UnityEngine.Application.dataPath, "gmcs.rsp");
 
@@ -255,6 +267,55 @@ namespace Plugins.Editor.JetBrains
       }
     }
 #endif
+    private const string UNITY_REFERENCE_KEYWORD = "-r:";
+    /// <summary>
+    /// Handles custom references -r: in "mcs.rsp"
+    /// </summary>
+    /// <param name="projectContentElement"></param>
+    /// <param name="xmlns"></param>
+    private static void ApplyManualCompilingSettingsReferences(XElement projectContentElement, XNamespace xmlns)
+    {
+      if (!File.Exists(PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH))
+        return;
+      
+      var configFilePath = PROJECT_MANUAL_CONFIG_ABSOLUTE_FILE_PATH;
+
+      if (File.Exists(configFilePath))
+      {
+        var configText = File.ReadAllText(configFilePath);
+        if (configText.Contains(UNITY_REFERENCE_KEYWORD))
+        {
+          var referenceList = new List<string>();
+          var compileFlags = configText.Split(' ', '\n');
+          foreach (var flag in compileFlags)
+          {
+            var f = flag.Trim();
+            if (f.Contains(UNITY_REFERENCE_KEYWORD))
+            {
+              var defineEndPos = f.IndexOf(UNITY_REFERENCE_KEYWORD) + UNITY_REFERENCE_KEYWORD.Length;
+              var definesSubString = f.Substring(defineEndPos,f.Length - defineEndPos);
+              definesSubString = definesSubString.Replace(";", ",");
+              referenceList.AddRange(definesSubString.Split(','));
+            }
+          }
+
+          foreach (var referenceName in referenceList)
+          {
+            ApplyCustomReference(referenceName, projectContentElement, xmlns);  
+          }
+        }
+      }
+    }
+
+    private static void ApplyCustomReference(string name, XElement projectContentElement, XNamespace xmlns)
+    {
+      var itemGroup = new XElement(xmlns + "ItemGroup");
+      var reference = new XElement(xmlns + "Reference");
+      reference.Add(new XAttribute("Include", Path.GetFileNameWithoutExtension(name)));
+      itemGroup.Add(reference);
+      projectContentElement.Add(itemGroup);
+    }
+
     // Helps resolve System.Linq under mono 4 - RIDER-573
     private static void FixTargetFrameworkVersion(XElement projectElement, XNamespace xmlns)
     {
@@ -263,7 +324,11 @@ namespace Plugins.Editor.JetBrains
         .FirstOrDefault(); // Processing csproj files, which are not Unity-generated #56
       if (targetFrameworkVersion != null)
       {
-        targetFrameworkVersion.SetValue("v"+RiderPlugin.TargetFrameworkVersion);
+        if (net46)
+          targetFrameworkVersion.SetValue("v"+RiderPlugin.TargetFrameworkVersion);
+        else
+          targetFrameworkVersion.SetValue("v"+RiderPlugin.TargetFrameworkVersionOldMono);
+        
       }
     }
 
@@ -303,6 +368,100 @@ namespace Plugins.Editor.JetBrains
 
       return "4";
     }
+    
+    private static bool net46 = 
+#if NET_4_6
+      true;
+#else
+      false;
+#endif
+
+    private static Type ourPdb2MdbDriver;
+    private static Type Pdb2MdbDriver
+    {
+      get
+      {
+        if (ourPdb2MdbDriver != null)
+          return ourPdb2MdbDriver;
+        Assembly assembly;
+        try
+        {
+          var path = Path.Combine(Directory.GetCurrentDirectory(), @"Library\resharper-unity-libs\pdb2mdb.exe");
+          var bytes = File.ReadAllBytes(path);
+          assembly = Assembly.Load(bytes);
+        }
+        catch (Exception)
+        {
+          RiderPlugin.Log(RiderPlugin.LoggingLevel.Verbose, "Loading pdb2mdb failed.");
+          assembly = null;
+        }
+
+        if (assembly == null)
+          return null;
+        var type = assembly.GetType("Pdb2Mdb.Driver");
+        if (type == null)
+          return null;
+        return ourPdb2MdbDriver = type;
+      }
+    }
+
+    public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
+    {
+      if (!RiderPlugin.Enabled)
+        return;
+      var toBeConverted = importedAssets.Where(a => 
+          a.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) &&
+          importedAssets.Any(a1 => a1 == Path.ChangeExtension(a, ".pdb")) &&
+          importedAssets.All(b => b != Path.ChangeExtension(a, ".dll.mdb")))
+        .ToArray();
+      foreach (var asset in toBeConverted)
+      {
+        var pdb = Path.ChangeExtension(asset, ".pdb");
+        if (!IsPortablePdb(pdb))
+          ConvertSymbolsForAssembly(asset);
+        else
+          RiderPlugin.Log(RiderPlugin.LoggingLevel.Verbose, string.Format("mdb generation for Portable pdb is not supported. {0}", pdb));
+      }
+    }
+
+    private static void ConvertSymbolsForAssembly(string asset)
+    {
+      if (Pdb2MdbDriver == null)
+      {
+        RiderPlugin.Log(RiderPlugin.LoggingLevel.Verbose, "FailedToConvertDebugSymbolsNoPdb2mdb.");
+        return;
+      }
+      
+      var method = Pdb2MdbDriver.GetMethod("Main", BindingFlags.Static | BindingFlags.NonPublic);
+      if (method == null)
+      {
+        RiderPlugin.Log(RiderPlugin.LoggingLevel.Verbose, "WarningFailedToConvertDebugSymbolsPdb2mdbMainIsNull.");
+        return;
+      }
+
+      var strArray = new[] { Path.GetFullPath(asset) };
+      method.Invoke(null, new object[] { strArray });
+    }
+    
+    //https://github.com/xamarin/xamarin-android/commit/4e30546f
+    const uint ppdb_signature = 0x424a5342;
+    public static bool IsPortablePdb(string filename)
+    {
+      try
+      {
+        using (var fs = new FileStream(filename, FileMode.Open, FileAccess.Read))
+        {
+          using (var br = new BinaryReader(fs))
+          {
+            return br.ReadUInt32() == ppdb_signature;
+          }
+        }
+      }
+      catch
+      {
+        return false;
+      }
+    }
   }
 }
 
@@ -318,7 +477,7 @@ namespace Plugins.Editor.JetBrains
     {
       if (level < SelectedLoggingLevel) return;
 
-      var text = "[Rider] [" + level + "] " + initialText;
+      var text = "[Rider] "+DateTime.Now.ToString("HH:mm:ss:ff")+" [" + level + "] " + initialText;
 
       switch (level)
       {
@@ -333,9 +492,18 @@ namespace Plugins.Editor.JetBrains
 
     private static string GetDefaultApp()
     {
-      var alreadySetPath = GetExternalScriptEditor();
-      if (!string.IsNullOrEmpty(alreadySetPath) && RiderPathExist(alreadySetPath))
-        return alreadySetPath;
+      var allFoundPaths = GetAllRiderPaths().Select(a=>new FileInfo(a).FullName).ToArray();
+      var alreadySetPath = new FileInfo(GetExternalScriptEditor()).FullName;
+      
+      if (!string.IsNullOrEmpty(alreadySetPath) && RiderPathExist(alreadySetPath) && !allFoundPaths.Any() ||
+          !string.IsNullOrEmpty(alreadySetPath) && RiderPathExist(alreadySetPath) && allFoundPaths.Any() &&
+          allFoundPaths.Contains(alreadySetPath))
+      {
+        RiderPath = alreadySetPath; 
+      }
+      else if (!string.IsNullOrEmpty(RiderPath) && allFoundPaths.Contains(new FileInfo(RiderPath).FullName)) {}
+      else
+      RiderPath = allFoundPaths.FirstOrDefault();
 
       return RiderPath;
     }
@@ -382,34 +550,30 @@ namespace Plugins.Editor.JetBrains
       return new string[0];
     }
 
-    private static string TargetFrameworkVersionDefault
+    private static string GetTargetFrameworkVersionDefault(string defaultValue)
     {
-      get
+      if (SystemInfoRiderPlugin.operatingSystemFamily == OperatingSystemFamily.Windows)
       {
-        var defaultValue = "4.5";
-        if (SystemInfoRiderPlugin.operatingSystemFamily == OperatingSystemFamily.Windows)
+        var dir = new DirectoryInfo(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework");
+        if (dir.Exists)
         {
-          var dir = new DirectoryInfo(@"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework");
-          if (dir.Exists)
+          var availableVersions = dir.GetDirectories("v*").Select(a => a.Name.Substring(1))
+            .Where(v => TryCatch(v, s => { })).ToArray();
+          if (availableVersions.Any() && !availableVersions.Contains(defaultValue))
           {
-            var availableVersions = dir.GetDirectories("v*").Select(a => a.Name.Substring(1))
-              .Where(v => TryCatch(v, s => { })).ToArray();
-            if (availableVersions.Any() && !availableVersions.Contains(defaultValue))
-            {
-              defaultValue = availableVersions.OrderBy(a => new Version(a)).Last();
-            }
+            defaultValue = availableVersions.OrderBy(a => new Version(a)).Last();
           }
         }
-        return defaultValue;
       }
+      return defaultValue;
     }
 
+
     public static string TargetFrameworkVersion
     {
       get
       {
-        return EditorPrefs.GetString("Rider_TargetFrameworkVersion",
-          EditorPrefs.GetBool("Rider_TargetFrameworkVersion45", true) ? TargetFrameworkVersionDefault : "3.5");
+        return EditorPrefs.GetString("Rider_TargetFrameworkVersion", GetTargetFrameworkVersionDefault("4.6"));
       }
       set
       {
@@ -419,6 +583,21 @@ namespace Plugins.Editor.JetBrains
         });
       }
     }
+    
+    public static string TargetFrameworkVersionOldMono
+    {
+      get
+      {
+        return EditorPrefs.GetString("Rider_TargetFrameworkVersionOldMono", GetTargetFrameworkVersionDefault("3.5"));
+      }
+      set
+      {
+        TryCatch(value, val =>
+        {
+          EditorPrefs.SetString("Rider_TargetFrameworkVersionOldMono", val);
+        });
+      }
+    }
 
     private static bool TryCatch(string value, Action<string> action)
     {
@@ -497,6 +676,8 @@ namespace Plugins.Editor.JetBrains
       SlnFile = Path.Combine(projectDirectory, string.Format("{0}.sln", projectName));
 
       InitializeEditorInstanceJson(projectDirectory);
+      
+      RiderAssetPostprocessor.OnGeneratedCSProjectFiles();
 
       Log(LoggingLevel.Info, "Rider plugin initialized. You may change the amount of Rider Debug output via Edit -> Preferences -> Rider -> Logging Level");
       Initialized = true;
@@ -578,7 +759,6 @@ namespace Plugins.Editor.JetBrains
           // make sure the plugin was initialized first.
           // this can happen in case "Rider" was set as the default scripting app only after this plugin was imported.
           InitRiderPlugin();
-          RiderAssetPostprocessor.OnGeneratedCSProjectFiles();
         }
 
         string appPath = Path.GetDirectoryName(Application.dataPath);
@@ -599,13 +779,10 @@ namespace Plugins.Editor.JetBrains
           return false;
 
         SyncSolution(); // added to handle opening file, which was just recently created.
-        if (!DetectPortAndOpenFile(line, assetFilePath,
-          SystemInfoRiderPlugin.operatingSystemFamily == OperatingSystemFamily.Windows))
-        {
-          var args = string.Format("{0}{1}{0} --line {2} {0}{3}{0}", "\"", SlnFile, line, assetFilePath);
-          return CallRider(args);
-        }
-        return true;
+        if (DetectPortAndOpenFile(line, assetFilePath, SystemInfoRiderPlugin.operatingSystemFamily == OperatingSystemFamily.Windows)) 
+          return true;
+        var args = string.Format("{0}{1}{0} --line {2} {0}{3}{0}", "\"", SlnFile, line, assetFilePath);
+        return CallRider(args);
       }
 
       return false;
@@ -621,7 +798,7 @@ namespace Plugins.Editor.JetBrains
           return false;
       }
 
-      int[] ports = Enumerable.Range(63342, 20).ToArray();
+      var ports = Enumerable.Range(63342, 20);
       var res = ports.Any(port =>
       {
         var aboutUrl = string.Format("http://localhost:{0}/api/about/", port);
@@ -816,20 +993,27 @@ namespace Plugins.Editor.JetBrains
           SetExternalScriptEditor(string.Empty);
           EditorGUILayout.HelpBox("Checking will set Rider as default external editor", MessageType.None);
         }
-
       }
-      var help = @"TargetFramework >= 4.5 is strongly recommended.
- - Without 4.5:
-    - Rider will fail to resolve System.Linq on Mac/Linux
-    - Rider will fail to resolve Firebase Analytics.
- - With 4.5 Rider may show ambiguous references in UniRx.
-All those problems will go away after Unity upgrades to mono4.";
-
-      TargetFrameworkVersion =
-        EditorGUILayout.TextField(
-          new GUIContent("TargetFrameworkVersion",
-            help), TargetFrameworkVersion);
-      EditorGUILayout.HelpBox(help, MessageType.None);
+
+      GUILayout.BeginVertical();
+      string status = "TargetFrameworkVersion for Runtime";
+      EditorGUILayout.TextArea(status, EditorStyles.boldLabel);
+        var help = @"TargetFramework >= 4.5 is recommended.";
+        TargetFrameworkVersion =
+          EditorGUILayout.TextField(
+            new GUIContent("NET 4.6",
+              help), TargetFrameworkVersion);
+        EditorGUILayout.HelpBox(help, MessageType.None);  
+        var helpOldMono = @"TargetFramework = 3.5 is recommended.
+ - With 4.5 Rider may show ambiguous references in UniRx.";
+
+        TargetFrameworkVersionOldMono =
+          EditorGUILayout.TextField(
+            new GUIContent("NET 3.5",
+              helpOldMono), TargetFrameworkVersionOldMono);
+        EditorGUILayout.HelpBox(helpOldMono, MessageType.None);
+      
+      GUILayout.EndVertical();
 
       EditorGUI.EndChangeCheck();
 
@@ -870,7 +1054,8 @@ All those problems will go away after Unity upgrades to mono4.";
     }
 
     #region SystemInfoRiderPlugin
-    static class SystemInfoRiderPlugin
+
+    private static class SystemInfoRiderPlugin
     {
       public static OperatingSystemFamily operatingSystemFamily
       {

+ 2 - 0
Unity/Assets/Scripts/Base/Event/Env.cs

@@ -1,11 +1,13 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
 
 namespace Model
 {
 	public class Env
 	{
+		[BsonElement, BsonIgnoreIfNull]
 		private Dictionary<EnvKey, object> values = new Dictionary<EnvKey, object>();
 
 		public object this[EnvKey key]

+ 2 - 2
Unity/Assets/Scripts/Base/Event/Env.cs.meta

@@ -1,7 +1,7 @@
 fileFormatVersion: 2
 guid: 414e43d5bdd3d75458b86b1cf07ad175
-timeCreated: 1477377275
-licenseType: Pro
+timeCreated: 1519353871
+licenseType: Free
 MonoImporter:
   serializedVersion: 2
   defaultReferences: []

+ 34 - 32
Unity/Assets/Scripts/Base/Object/EventSystem.cs

@@ -14,20 +14,6 @@ namespace Model
 
 	public sealed class EventSystem
 	{
-		private Assembly hotfixAssembly;
-
-		public Assembly HotfixAssembly
-		{
-			get
-			{
-				return this.hotfixAssembly;
-			}
-			set
-			{
-				this.hotfixAssembly = value;
-			}
-		}
-
 		private readonly Dictionary<DLLType, Assembly> assemblies = new Dictionary<DLLType, Assembly>();
 
 		private readonly Dictionary<int, List<IEvent>> allEvents = new Dictionary<int, List<IEvent>>();
@@ -55,16 +41,6 @@ namespace Model
 
 		private readonly HashSet<Component> unique = new HashSet<Component>();
 
-		public void LoadHotfixDll()
-		{
-#if ILRuntime
-			DllHelper.LoadHotfixAssembly();	
-#else
-			this.HotfixAssembly = DllHelper.LoadHotfixAssembly();
-#endif
-			this.Load();
-		}
-
 		public void Add(DLLType dllType, Assembly assembly)
 		{
 			this.assemblies[dllType] = assembly;
@@ -135,6 +111,8 @@ namespace Model
 					this.RegisterEvent(aEventAttribute.Type, iEvent);
 				}
 			}
+
+			this.Load();
 		}
 
 		public void RegisterEvent(int eventId, IEvent e)
@@ -197,7 +175,13 @@ namespace Model
 				{
 					continue;
 				}
-				aAwakeSystem.Run(disposer);
+				
+				IAwake iAwake = aAwakeSystem as IAwake;
+				if (iAwake == null)
+				{
+					continue;
+				}
+				iAwake.Run(disposer);
 			}
 		}
 
@@ -217,7 +201,13 @@ namespace Model
 				{
 					continue;
 				}
-				aAwakeSystem.Run(disposer, p1);
+				
+				IAwake<P1> iAwake = aAwakeSystem as IAwake<P1>;
+				if (iAwake == null)
+				{
+					continue;
+				}
+				iAwake.Run(disposer, p1);
 			}
 		}
 
@@ -237,7 +227,13 @@ namespace Model
 				{
 					continue;
 				}
-				aAwakeSystem.Run(disposer, p1, p2);
+				
+				IAwake<P1, P2> iAwake = aAwakeSystem as IAwake<P1, P2>;
+				if (iAwake == null)
+				{
+					continue;
+				}
+				iAwake.Run(disposer, p1, p2);
 			}
 		}
 
@@ -257,7 +253,13 @@ namespace Model
 				{
 					continue;
 				}
-				aAwakeSystem.Run(disposer, p1, p2, p3);
+
+				IAwake<P1, P2, P3> iAwake = aAwakeSystem as IAwake<P1, P2, P3>;
+				if (iAwake == null)
+				{
+					continue;
+				}
+				iAwake.Run(disposer, p1, p2, p3);
 			}
 		}
 
@@ -418,7 +420,7 @@ namespace Model
 		public void Run(int type)
 		{
 			List<IEvent> iEvents;
-			if (!this.allEvents.TryGetValue((int)type, out iEvents))
+			if (!this.allEvents.TryGetValue(type, out iEvents))
 			{
 				return;
 			}
@@ -438,7 +440,7 @@ namespace Model
 		public void Run<A>(int type, A a)
 		{
 			List<IEvent> iEvents;
-			if (!this.allEvents.TryGetValue((int)type, out iEvents))
+			if (!this.allEvents.TryGetValue(type, out iEvents))
 			{
 				return;
 			}
@@ -458,7 +460,7 @@ namespace Model
 		public void Run<A, B>(int type, A a, B b)
 		{
 			List<IEvent> iEvents;
-			if (!this.allEvents.TryGetValue((int)type, out iEvents))
+			if (!this.allEvents.TryGetValue(type, out iEvents))
 			{
 				return;
 			}
@@ -478,7 +480,7 @@ namespace Model
 		public void Run<A, B, C>(int type, A a, B b, C c)
 		{
 			List<IEvent> iEvents;
-			if (!this.allEvents.TryGetValue((int)type, out iEvents))
+			if (!this.allEvents.TryGetValue(type, out iEvents))
 			{
 				return;
 			}

+ 30 - 15
Unity/Assets/Scripts/Base/Object/IAwake.cs

@@ -5,21 +5,36 @@ namespace Model
 	public abstract class AAwakeSystem
 	{
 		public abstract Type Type();
+	}
 
-		public virtual void Run(object o){ }
-		public virtual void Run(object o, object a) { }
-		public virtual void Run(object o, object a, object b) { }
-		public virtual void Run(object o, object a, object b, object c) { }
+	public interface IAwake
+	{
+		void Run(object o);
+	}
+	
+	public interface IAwake<A>
+	{
+		void Run(object o, A a);
+	}
+	
+	public interface IAwake<A, B>
+	{
+		void Run(object o, A a, B b);
+	}
+	
+	public interface IAwake<A, B, C>
+	{
+		void Run(object o, A a, B b, C c);
 	}
 
-	public abstract class AwakeSystem<T> : AAwakeSystem
+	public abstract class AwakeSystem<T> : AAwakeSystem, IAwake
 	{
 		public override Type Type()
 		{
 			return typeof(T);
 		}
 
-		public override void Run(object o)
+		public void Run(object o)
 		{
 			this.Awake((T)o);
 		}
@@ -27,46 +42,46 @@ namespace Model
 		public abstract void Awake(T self);
 	}
 
-	public abstract class AwakeSystem<T, A> : AAwakeSystem
+	public abstract class AwakeSystem<T, A> : AAwakeSystem, IAwake<A>
 	{
 		public override Type Type()
 		{
 			return typeof(T);
 		}
 
-		public override void Run(object o, object a)
+		public void Run(object o, A a)
 		{
-			this.Awake((T)o, (A)a);
+			this.Awake((T)o, a);
 		}
 
 		public abstract void Awake(T self, A a);
 	}
 
-	public abstract class AwakeSystem<T, A, B> : AAwakeSystem
+	public abstract class AwakeSystem<T, A, B> : AAwakeSystem, IAwake<A, B>
 	{
 		public override Type Type()
 		{
 			return typeof(T);
 		}
 
-		public override void Run(object o, object a, object b)
+		public void Run(object o, A a, B b)
 		{
-			this.Awake((T)o, (A)a, (B)b);
+			this.Awake((T)o, a, b);
 		}
 
 		public abstract void Awake(T self, A a, B b);
 	}
 
-	public abstract class AwakeSystem<T, A, B, C> : AAwakeSystem
+	public abstract class AwakeSystem<T, A, B, C> : AAwakeSystem, IAwake<A, B, C>
 	{
 		public override Type Type()
 		{
 			return typeof(T);
 		}
 
-		public override void Run(object o, object a, object b, object c)
+		public void Run(object o, A a, B b, C c)
 		{
-			this.Awake((T)o, (A)a, (B)b, (C)c);
+			this.Awake((T)o, a, b, c);
 		}
 
 		public abstract void Awake(T self, A a, B b, C c);

+ 1 - 1
Unity/Assets/Scripts/Component/ClientFrameComponent.cs

@@ -79,7 +79,7 @@ namespace Model
             {
 	            IFrameMessage message = (IFrameMessage)sessionFrameMessage.FrameMessage.Messages[i];
 	            ushort opcode = Game.Scene.GetComponent<OpcodeTypeComponent>().GetOpcode(message.GetType());
-                Game.Scene.GetComponent<MessageDispatherComponent>().Handle(sessionFrameMessage.Session, 0, new MessageInfo() { Opcode= opcode, Message = message });
+                Game.Scene.GetComponent<MessageDispatherComponent>().Handle(sessionFrameMessage.Session, new MessageInfo(0, opcode, message));
             }
         }
     }

+ 11 - 0
Unity/Assets/Scripts/Entity/Game.cs

@@ -38,12 +38,23 @@
 			}
 		}
 
+		private static Hotfix hotfix;
+
+		public static Hotfix Hotfix
+		{
+			get
+			{
+				return hotfix ?? (hotfix = new Hotfix());
+			}
+		}
+
 		public static void Close()
 		{
 			scene.Dispose();
 			eventSystem = null;
 			scene = null;
 			objectPool = null;
+			hotfix = null;
 		}
 	}
 }

+ 83 - 0
Unity/Assets/Scripts/Entity/Hotfix.cs

@@ -0,0 +1,83 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using UnityEngine;
+
+namespace Model
+{
+	public sealed class Hotfix : Object
+	{
+		public Assembly HotfixAssembly;
+		public ILRuntime.Runtime.Enviorment.AppDomain AppDomain;
+
+		private readonly IStaticMethod start;
+
+		public Action Update;
+		public Action LateUpdate;
+		public Action OnApplicationQuit;
+
+		public Hotfix()
+		{
+			Game.Scene.GetComponent<ResourcesComponent>().LoadBundle($"code.unity3d");
+			this.LoadHotfixAssembly();
+			Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"code.unity3d");
+
+#if ILRuntime
+			this.start = new ILStaticMethod(this.AppDomain, "Hotfix.Init", "Start", 0);
+#else
+			Type hotfixInit = this.HotfixAssembly.GetType("Hotfix.Init");
+			this.start = new MonoStaticMethod(hotfixInit, "Start");
+#endif
+		}
+
+		public void GotoHotfix()
+		{
+#if ILRuntime
+			ILHelper.InitILRuntime();
+#endif
+			this.start.Run();
+		}
+
+		public Type[] GetHotfixTypes()
+		{
+#if ILRuntime
+			if (this.AppDomain == null)
+			{
+				return new Type[0];
+			}
+
+			return this.AppDomain.LoadedTypes.Values.Select(x => x.ReflectionType).ToArray();
+#else
+			if (this.HotfixAssembly == null)
+			{
+				return new Type[0];
+			}
+			return this.HotfixAssembly.GetTypes();
+#endif
+		}
+
+
+		public void LoadHotfixAssembly()
+		{
+#if ILRuntime
+			this.AppDomain = new ILRuntime.Runtime.Enviorment.AppDomain();
+			GameObject code = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<GameObject>("code.unity3d", "Code");
+			byte[] assBytes = code.Get<TextAsset>("Hotfix.dll").bytes;
+			byte[] mdbBytes = code.Get<TextAsset>("Hotfix.pdb").bytes;
+
+			using (MemoryStream fs = new MemoryStream(assBytes))
+			using (MemoryStream p = new MemoryStream(mdbBytes))
+			{
+				this.AppDomain.LoadAssembly(fs, p, new Mono.Cecil.Pdb.PdbReaderProvider());
+			}
+#else
+			GameObject code = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<GameObject>("code.unity3d", "Code");
+			byte[] assBytes = code.Get<TextAsset>("Hotfix.dll").bytes;
+			byte[] mdbBytes = code.Get<TextAsset>("Hotfix.mdb").bytes;
+			Assembly assembly = Assembly.Load(assBytes, mdbBytes);
+			this.HotfixAssembly = assembly;
+#endif
+		}
+	}
+}

+ 2 - 2
Unity/Assets/ThirdParty/ILRuntime/Generated/Model_IStart_Binding.cs.meta → Unity/Assets/Scripts/Entity/Hotfix.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: e83a699523130dc4ba27f88bcee23169
-timeCreated: 1517835576
+guid: 215cac430b6981846af57c700e50a0bf
+timeCreated: 1519355490
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 54
Unity/Assets/Scripts/Entity/Message/Opcode.cs

@@ -1,54 +0,0 @@
-namespace Model
-{
-	public static partial class Opcode
-	{
-		 public const ushort Actor_Test = 1105;
-		 public const ushort Actor_TestRequest = 1106;
-		 public const ushort Actor_TestResponse = 1107;
-		 public const ushort Actor_TransferRequest = 1108;
-		 public const ushort Actor_TransferResponse = 1109;
-		 public const ushort C2G_EnterMap = 1110;
-		 public const ushort G2C_EnterMap = 1111;
-		 public const ushort UnitInfo = 1112;
-		 public const ushort Actor_CreateUnits = 1113;
-		 public const ushort FrameMessageInfo = 1114;
-		 public const ushort FrameMessage = 1115;
-		 public const ushort Frame_ClickMap = 1116;
-		 public const ushort C2M_Reload = 1117;
-		 public const ushort M2C_Reload = 1118;
-		 public const ushort C2R_Ping = 1119;
-		 public const ushort R2C_Ping = 1120;
-		 public const ushort M2M_TrasferUnitRequest = 2005;
-		 public const ushort M2M_TrasferUnitResponse = 2006;
-		 public const ushort M2A_Reload = 2007;
-		 public const ushort A2M_Reload = 2008;
-		 public const ushort G2G_LockRequest = 2009;
-		 public const ushort G2G_LockResponse = 2010;
-		 public const ushort G2G_LockReleaseRequest = 2011;
-		 public const ushort G2G_LockReleaseResponse = 2012;
-		 public const ushort DBSaveRequest = 2013;
-		 public const ushort DBSaveBatchResponse = 2014;
-		 public const ushort DBSaveBatchRequest = 2015;
-		 public const ushort DBSaveResponse = 2016;
-		 public const ushort DBQueryRequest = 2017;
-		 public const ushort DBQueryResponse = 2018;
-		 public const ushort DBQueryBatchRequest = 2019;
-		 public const ushort DBQueryBatchResponse = 2020;
-		 public const ushort DBQueryJsonRequest = 2021;
-		 public const ushort DBQueryJsonResponse = 2022;
-		 public const ushort ObjectAddRequest = 2023;
-		 public const ushort ObjectAddResponse = 2024;
-		 public const ushort ObjectRemoveRequest = 2025;
-		 public const ushort ObjectRemoveResponse = 2026;
-		 public const ushort ObjectLockRequest = 2027;
-		 public const ushort ObjectLockResponse = 2028;
-		 public const ushort ObjectUnLockRequest = 2029;
-		 public const ushort ObjectUnLockResponse = 2030;
-		 public const ushort ObjectGetRequest = 2031;
-		 public const ushort ObjectGetResponse = 2032;
-		 public const ushort R2G_GetLoginKey = 2033;
-		 public const ushort G2R_GetLoginKey = 2034;
-		 public const ushort G2M_CreateUnit = 2035;
-		 public const ushort M2G_CreateUnit = 2036;
-	}
-}

+ 1 - 66
Unity/Assets/Scripts/Helper/DllHelper.cs

@@ -1,59 +1,12 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Reflection;
-using ILRuntime.CLR.Method;
-using ILRuntime.CLR.TypeSystem;
-using UnityEngine;
 
 namespace Model
 {
 	public static class DllHelper
 	{
-#if ILRuntime
-		public static void LoadHotfixAssembly()
-		{
-			GameObject code = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<GameObject>("code.unity3d", "Code");
-			byte[] assBytes = code.Get<TextAsset>("Hotfix.dll").bytes;
-			byte[] mdbBytes = code.Get<TextAsset>("Hotfix.pdb").bytes;
-
-			using (MemoryStream fs = new MemoryStream(assBytes))
-			using (MemoryStream p = new MemoryStream(mdbBytes))
-			{
-				Init.Instance.AppDomain.LoadAssembly(fs, p, new Mono.Cecil.Pdb.PdbReaderProvider());
-			}
-		}
-#else
-		public static Assembly LoadHotfixAssembly()
-		{
-			GameObject code = Game.Scene.GetComponent<ResourcesComponent>().GetAsset<GameObject>("code.unity3d", "Code");
-			byte[] assBytes = code.Get<TextAsset>("Hotfix.dll").bytes;
-			byte[] mdbBytes = code.Get<TextAsset>("Hotfix.mdb").bytes;
-			Assembly assembly = Assembly.Load(assBytes, mdbBytes);
-			return assembly;
-		}
-#endif
-
-		public static Type[] GetHotfixTypes()
-		{
-#if ILRuntime
-			ILRuntime.Runtime.Enviorment.AppDomain appDomain = Init.Instance.AppDomain;
-			if (appDomain == null)
-			{
-				return new Type[0];
-			}
-
-			return appDomain.LoadedTypes.Values.Select(x => x.ReflectionType).ToArray();
-#else
-			if (Game.EventSystem.HotfixAssembly == null)
-			{
-				return new Type[0];
-			}
-			return Game.EventSystem.HotfixAssembly.GetTypes();
-#endif
-		}
-
 		public static Type[] GetMonoTypes()
 		{
 			List<Type> types = new List<Type>();
@@ -73,26 +26,8 @@ namespace Model
 				types.AddRange(assembly.GetTypes());
 			}
 
-			types.AddRange(GetHotfixTypes());
+			types.AddRange(Game.Hotfix.GetHotfixTypes());
 			return types.ToArray();
 		}
-
-#if ILRuntime
-		public static IMethod[] GetMethodInfo(string typeName)
-		{
-			ILRuntime.Runtime.Enviorment.AppDomain appDomain = Init.Instance.AppDomain;
-			if (appDomain == null)
-			{
-				return new IMethod[0];
-			}
-			
-			return appDomain.GetType(typeName).GetMethods().ToArray();
-		}
-
-		public static IType GetType(string typeName)
-		{
-			return Init.Instance.AppDomain.GetType(typeName);
-		}
-#endif
 	}
 }

+ 12 - 12
Unity/Assets/Scripts/Helper/ILHelper.cs

@@ -15,23 +15,23 @@ namespace Model
 		{
 			// 注册重定向函数
 			MethodInfo mi = typeof(Log).GetMethod("Debug", new Type[] { typeof(string) });
-			Init.Instance.AppDomain.RegisterCLRMethodRedirection(mi, ILRedirection.LogDebug);
+			Game.Hotfix.AppDomain.RegisterCLRMethodRedirection(mi, ILRedirection.LogDebug);
 
 			MethodInfo mi2 = typeof(Log).GetMethod("Info", new Type[] { typeof(string) });
-			Init.Instance.AppDomain.RegisterCLRMethodRedirection(mi2, ILRedirection.LogInfo);
+			Game.Hotfix.AppDomain.RegisterCLRMethodRedirection(mi2, ILRedirection.LogInfo);
 
 			MethodInfo mi3 = typeof(Log).GetMethod("Error", new Type[] { typeof(string) });
-			Init.Instance.AppDomain.RegisterCLRMethodRedirection(mi3, ILRedirection.LogError);
+			Game.Hotfix.AppDomain.RegisterCLRMethodRedirection(mi3, ILRedirection.LogError);
 
 			// 注册委托
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<List<object>>();
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<AChannel, System.Net.Sockets.SocketError>();
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<byte[], int, int>();
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<IResponse>();
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<Session, PacketInfo>();
-			Init.Instance.AppDomain.DelegateManager.RegisterMethodDelegate<Session, object>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<List<object>>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<AChannel, System.Net.Sockets.SocketError>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<byte[], int, int>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<IResponse>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<Session, PacketInfo>();
+			Game.Hotfix.AppDomain.DelegateManager.RegisterMethodDelegate<Session, uint, object>();
 
-			 CLRBindings.Initialize(Init.Instance.AppDomain);
+			CLRBindings.Initialize(Game.Hotfix.AppDomain);
 
 			// 注册适配器
 			Assembly assembly = typeof(Init).Assembly;
@@ -48,7 +48,7 @@ namespace Model
 				{
 					continue;
 				}
-				Init.Instance.AppDomain.RegisterCrossBindingAdaptor(adaptor);
+				Game.Hotfix.AppDomain.RegisterCrossBindingAdaptor(adaptor);
 			}
 
 			// 初始化ILRuntime的protobuf
@@ -68,7 +68,7 @@ namespace Model
 
 		private static object PType_CreateInstance(string typeName)
 		{
-			return Init.Instance.AppDomain.Instantiate(typeName);
+			return Game.Hotfix.AppDomain.Instantiate(typeName);
 		}
 
 		private static Type PType_GetRealType(object o)

+ 4 - 47
Unity/Assets/Scripts/Init.cs

@@ -1,27 +1,10 @@
 using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Reflection;
-using System.Threading;
-using ILRuntime.CLR.Method;
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.Runtime.Enviorment;
 using UnityEngine;
 
 namespace Model
 {
 	public class Init : MonoBehaviour
 	{
-		public static Init Instance;
-
-		public ILRuntime.Runtime.Enviorment.AppDomain AppDomain;
-
-		private IStaticMethod start;
-
-		public Action HotfixUpdate;
-		public Action HotfixLateUpdate;
-		public Action HotfixOnApplicationQuit;
-
 		private async void Start()
 		{
 			try
@@ -32,9 +15,6 @@ namespace Model
 				}
 
 				DontDestroyOnLoad(gameObject);
-				Instance = this;
-
-
 				Game.EventSystem.Add(DLLType.Model, typeof(Init).Assembly);
 
 				Game.Scene.AddComponent<GlobalConfigComponent>();
@@ -46,7 +26,6 @@ namespace Model
 				Game.Scene.AddComponent<ClientFrameComponent>();
 				Game.Scene.AddComponent<UIComponent>();
 
-
 				// 下载ab包
 				await BundleHelper.DownloadBundle();
 				
@@ -54,31 +33,10 @@ namespace Model
 				Game.Scene.GetComponent<ResourcesComponent>().LoadBundle("config.unity3d");
 				Game.Scene.AddComponent<ConfigComponent>();
 				Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle("config.unity3d");
-
 				Game.Scene.AddComponent<OpcodeTypeComponent>();
 				Game.Scene.AddComponent<MessageDispatherComponent>();
 
-#if ILRuntime
-				Log.Debug("run in ilruntime mode");
-
-				this.AppDomain = new ILRuntime.Runtime.Enviorment.AppDomain();
-				Game.Scene.GetComponent<ResourcesComponent>().LoadBundle($"code.unity3d");
-				Game.EventSystem.LoadHotfixDll();
-				Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"code.unity3d");
-				ILHelper.InitILRuntime();
-				
-				this.start = new ILStaticMethod("Hotfix.Init", "Start", 0);
-#else
-				Log.Debug("run in mono mode");
-				Game.Scene.GetComponent<ResourcesComponent>().LoadBundle($"code.unity3d");
-				Game.EventSystem.LoadHotfixDll();
-				Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"code.unity3d");
-				Type hotfixInit = Game.EventSystem.HotfixAssembly.GetType("Hotfix.Init");
-				this.start = new MonoStaticMethod(hotfixInit, "Start");
-#endif
-
-				// 进入热更新层
-				this.start.Run();
+				Game.Hotfix.GotoHotfix();
 
 				Game.EventSystem.Run(EventIdType.TestHotfixSubscribMonoEvent, "TestHotfixSubscribMonoEvent");
 			}
@@ -90,21 +48,20 @@ namespace Model
 
 		private void Update()
 		{
-			this.HotfixUpdate?.Invoke();
+			Game.Hotfix.Update?.Invoke();
 			Game.EventSystem.Update();
 		}
 
 		private void LateUpdate()
 		{
-			this.HotfixLateUpdate?.Invoke();
+			Game.Hotfix.LateUpdate?.Invoke();
 			Game.EventSystem.LateUpdate();
 		}
 
 		private void OnApplicationQuit()
 		{
-			Instance = null;
+			Game.Hotfix.OnApplicationQuit?.Invoke();
 			Game.Close();
-			this.HotfixOnApplicationQuit?.Invoke();
 		}
 	}
 }

+ 0 - 0
Unity/Assets/Scripts/Entity/Message.meta → Unity/Assets/Scripts/Message.meta


+ 0 - 0
Unity/Assets/Scripts/Entity/Message/OuterMessage.cs → Unity/Assets/Scripts/Message/OuterMessage.cs


+ 0 - 0
Unity/Assets/Scripts/Entity/Message/OuterMessage.cs.meta → Unity/Assets/Scripts/Message/OuterMessage.cs.meta


+ 22 - 0
Unity/Assets/Scripts/Message/OuterOpcode.cs

@@ -0,0 +1,22 @@
+namespace Model
+{
+	public static partial class Opcode
+	{
+		 public const ushort Actor_Test = 1105;
+		 public const ushort Actor_TestRequest = 1106;
+		 public const ushort Actor_TestResponse = 1107;
+		 public const ushort Actor_TransferRequest = 1108;
+		 public const ushort Actor_TransferResponse = 1109;
+		 public const ushort C2G_EnterMap = 1110;
+		 public const ushort G2C_EnterMap = 1111;
+		 public const ushort UnitInfo = 1112;
+		 public const ushort Actor_CreateUnits = 1113;
+		 public const ushort FrameMessageInfo = 1114;
+		 public const ushort FrameMessage = 1115;
+		 public const ushort Frame_ClickMap = 1116;
+		 public const ushort C2M_Reload = 1117;
+		 public const ushort M2C_Reload = 1118;
+		 public const ushort C2R_Ping = 1119;
+		 public const ushort R2C_Ping = 1120;
+	}
+}

+ 0 - 0
Unity/Assets/Scripts/Entity/Message/Opcode.cs.meta → Unity/Assets/Scripts/Message/OuterOpcode.cs.meta


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree.meta → Unity/Assets/Scripts/Module/BehaviorTree.meta

@@ -1,7 +1,7 @@
 fileFormatVersion: 2
-guid: 58ca433433534ba46b5dfb9d0265417c
+guid: 12a2232344cb1734eb35506fa372513f
 folderAsset: yes
-timeCreated: 1505098438
+timeCreated: 1519353624
 licenseType: Free
 DefaultImporter:
   userData: 

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BTEnv.cs → Unity/Assets/Scripts/Module/BehaviorTree/BTEnv.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BTEnv.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BTEnv.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 05dd0723a5e82eb41b9927aa293a46e9
-timeCreated: 1498181748
+guid: f865ee89a8dde7f40ba16d7319261c5a
+timeCreated: 1519353625
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BTEnvKey.cs → Unity/Assets/Scripts/Module/BehaviorTree/BTEnvKey.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BTEnvKey.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BTEnvKey.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: b7cba167cceae124bbc6ec22b55ea56b
-timeCreated: 1498181749
+guid: 9e2f26f23b509614e94a015605c2cf24
+timeCreated: 1519353624
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorNodeConfig.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorNodeConfig.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorNodeConfig.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorNodeConfig.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 840ecb1e4ef94d2429fcb0ff2696d581
-timeCreated: 1498181749
+guid: 849fe6d554bd9e7458d2bd89cd8c2155
+timeCreated: 1519353624
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTree.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTree.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTree.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTree.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: bb33add641d278d40a4a7dede6ec3ddf
-timeCreated: 1498181749
+guid: d9f1490957c01cd48850fee745ecdfdd
+timeCreated: 1519353625
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeArgsDict.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeArgsDict.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeArgsDict.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeArgsDict.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: eeeafd09047a2f54ba159819a0b24882
-timeCreated: 1498181749
+guid: 36e5951865a520b418556b6f7dd6614f
+timeCreated: 1519353624
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 0 - 0
Unity/Assets/Scripts/Component/BehaviorTreeComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Component/BehaviorTreeComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeConfig.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeConfig.cs


+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeConfig.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeConfig.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: 4f1d451aabfc8454d94cbc4032d6a308
-timeCreated: 1498181748
+guid: cca06a3236e89d1498c8bc281f90e277
+timeCreated: 1519353625
 licenseType: Free
 MonoImporter:
   serializedVersion: 2

+ 2 - 2
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType.meta

@@ -1,7 +1,7 @@
 fileFormatVersion: 2
-guid: e1bdacfc227684c46a9f05cf5e879e3b
+guid: d59951d9e4d246944bec403fa30a926e
 folderAsset: yes
-timeCreated: 1498181748
+timeCreated: 1519353624
 licenseType: Free
 DefaultImporter:
   userData: 

+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeBaseComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BTTypeManager.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeManager.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BTTypeManager.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BTTypeManager.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayDoubleComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayFloatComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayInt64Component.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayIntComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTArrayStringComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTBoolComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTDoubleComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTEnumComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTFloatComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTInt64Component.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTIntComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/BaseType/BTStringComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayAudioClipComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayGameObjectComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayMaterialComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayShaderComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArraySpriteComponent..cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture2DComponent..cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTexture3DComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTArrayTextureComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTAudioClipComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs.meta → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTGameObjectComponent.cs.meta


+ 0 - 0
Unity/Assets/Scripts/Base/BehaviorTree/BehaviorTreeType/UnityType/BTMaterialComponent.cs → Unity/Assets/Scripts/Module/BehaviorTree/BehaviorTreeType/UnityType/BTMaterialComponent.cs


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików