فهرست منبع

增加ComponentView功能,客户端可视化

tanghai 7 سال پیش
والد
کامیت
ecc328c290
100فایلهای تغییر یافته به همراه2230 افزوده شده و 800 حذف شده
  1. 1 0
      Client-Server.sln.DotSettings.user
  2. 0 15
      Server/Model/Entity/Config/StartConfig.cs
  3. 1 1
      Server/Model/Entity/Game.cs
  4. 0 9
      Server/Model/Module/Config/AConfigComponent.cs
  5. 0 0
      Server/Model/Module/Demo/UnitConfig.cs
  6. 0 0
      Server/Model/Module/Http/Http.cs
  7. 6 0
      Server/Model/Server.Model.csproj
  8. 290 205
      Unity/Assets/Bundles/UI/UILobby.prefab
  9. 187 102
      Unity/Assets/Bundles/UI/UILogin.prefab
  10. 1 1
      Unity/Assets/Editor/ComponentViewEditor.meta
  11. 91 0
      Unity/Assets/Editor/ComponentViewEditor/ComponentViewEditor.cs
  12. 1 1
      Unity/Assets/Editor/ComponentViewEditor/ComponentViewEditor.cs.meta
  13. 1 1
      Unity/Assets/Editor/ComponentViewEditor/Entity.meta
  14. 199 0
      Unity/Assets/Editor/ComponentViewEditor/Entity/EditorLayout.cs
  15. 2 3
      Unity/Assets/Editor/ComponentViewEditor/Entity/EditorLayout.cs.meta
  16. 133 0
      Unity/Assets/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs
  17. 11 0
      Unity/Assets/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs.meta
  18. 11 0
      Unity/Assets/Editor/ComponentViewEditor/ITypeDrawer.cs
  19. 11 0
      Unity/Assets/Editor/ComponentViewEditor/ITypeDrawer.cs.meta
  20. 1 1
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer.meta
  21. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/AnimationCurveTypeDrawer.cs
  22. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/AnimationCurveTypeDrawer.cs.meta
  23. 19 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoolTypeDrawer.cs
  24. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoolTypeDrawer.cs.meta
  25. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoundsTypeDrawer.cs
  26. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoundsTypeDrawer.cs.meta
  27. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/CharTypeDrawer.cs
  28. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/CharTypeDrawer.cs.meta
  29. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/ColorTypeDrawer.cs
  30. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/ColorTypeDrawer.cs.meta
  31. 25 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DateTimeTypeDrawer.cs
  32. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DateTimeTypeDrawer.cs.meta
  33. 19 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DoubleTypeDrawer.cs
  34. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DoubleTypeDrawer.cs.meta
  35. 24 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/EnumTypeDrawer.cs
  36. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/EnumTypeDrawer.cs.meta
  37. 19 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/FloatTypeDrawer.cs
  38. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/FloatTypeDrawer.cs.meta
  39. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/IntTypeDrawer.cs
  40. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/IntTypeDrawer.cs.meta
  41. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/LongTypeDrawer.cs
  42. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/LongTypeDrawer.cs.meta
  43. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/RectTypeDrawer.cs
  44. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/RectTypeDrawer.cs.meta
  45. 19 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/StringTypeDrawer.cs
  46. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/StringTypeDrawer.cs.meta
  47. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/UnityObjectTypeDrawer.cs
  48. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/UnityObjectTypeDrawer.cs.meta
  49. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector2TypeDrawer.cs
  50. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector2TypeDrawer.cs.meta
  51. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector3TypeDrawer.cs
  52. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector3TypeDrawer.cs.meta
  53. 20 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector4TypeDrawer.cs
  54. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector4TypeDrawer.cs.meta
  55. 8 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawerAttribute.cs
  56. 11 0
      Unity/Assets/Editor/ComponentViewEditor/TypeDrawerAttribute.cs.meta
  57. 2 0
      Unity/Assets/Hotfix/Base/Event/EventIdType.cs
  58. 67 7
      Unity/Assets/Hotfix/Base/Object/Component.cs
  59. 202 44
      Unity/Assets/Hotfix/Base/Object/ComponentFactory.cs
  60. 2 1
      Unity/Assets/Hotfix/Entity/Game.cs
  61. 0 4
      Unity/Assets/Hotfix/Entity/Scene.cs
  62. 0 2
      Unity/Assets/Hotfix/Init.cs
  63. 1 1
      Unity/Assets/Hotfix/Module/Demo/Helper.meta
  64. 47 0
      Unity/Assets/Hotfix/Module/Demo/Helper/LoginHelper.cs
  65. 11 0
      Unity/Assets/Hotfix/Module/Demo/Helper/LoginHelper.cs.meta
  66. 37 0
      Unity/Assets/Hotfix/Module/Demo/Helper/MapHelper.cs
  67. 11 0
      Unity/Assets/Hotfix/Module/Demo/Helper/MapHelper.cs.meta
  68. 8 0
      Unity/Assets/Hotfix/Module/Demo/UI.meta
  69. 8 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby.meta
  70. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component.meta
  71. 38 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component/UILobbyComponent.cs
  72. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component/UILobbyComponent.cs.meta
  73. 8 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System.meta
  74. 14 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/EnterMapFinish_RemoveLobbyUI.cs
  75. 11 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/EnterMapFinish_RemoveLobbyUI.cs.meta
  76. 14 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/LoginFinish_CreateLobbyUI.cs
  77. 11 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/LoginFinish_CreateLobbyUI.cs.meta
  78. 29 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/UILobbyFactory.cs
  79. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/UILobbyFactory.cs.meta
  80. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin.meta
  81. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component.meta
  82. 36 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component/UILoginComponent.cs
  83. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component/UILoginComponent.cs.meta
  84. 8 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System.meta
  85. 2 1
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/InitSceneStart_CreateLoginUI.cs
  86. 0 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/InitSceneStart_CreateLoginUI.cs.meta
  87. 14 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/LoginFinish_RemoveLoginUI.cs
  88. 11 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/LoginFinish_RemoveLoginUI.cs.meta
  89. 30 0
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/UILoginFactory.cs
  90. 1 1
      Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/UILoginFactory.cs.meta
  91. 18 1
      Unity/Assets/Hotfix/Module/Message/SessionComponent.cs
  92. 12 14
      Unity/Assets/Hotfix/Module/UI/UI.cs
  93. 15 130
      Unity/Assets/Hotfix/Module/UI/UIComponent.cs
  94. 0 35
      Unity/Assets/Hotfix/Properties/AssemblyInfo.cs
  95. 1 1
      Unity/Assets/Hotfix/UI/UILobby.meta
  96. 0 65
      Unity/Assets/Hotfix/UI/UILobby/Component/UILobbyComponent.cs
  97. 0 36
      Unity/Assets/Hotfix/UI/UILobby/Factory/UILobbyFactory.cs
  98. 0 78
      Unity/Assets/Hotfix/UI/UILogin/Component/UILoginComponent.cs
  99. 0 36
      Unity/Assets/Hotfix/UI/UILogin/Factory/UILoginFactory.cs
  100. 63 4
      Unity/Assets/Model/Base/Object/Component.cs

+ 1 - 0
Client-Server.sln.DotSettings.user

@@ -42,6 +42,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003AEntity_002Fd_003AConfig_002Ff_003AStartConfig_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003AModule_002Fd_003AMessage_002Ff_003AAMRpcHandler_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=EE38E3D2_002D3D2A_002D4061_002DBD50_002DAE8568126C7D_002Fd_003AModule_002Fd_003AMessage_002Ff_003ANetInnerComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">VISIBLE_FILES</s:String>
 	
 	
 	<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">HINT</s:String>

+ 0 - 15
Server/Model/Entity/Config/StartConfig.cs

@@ -1,15 +0,0 @@
-using MongoDB.Bson;
-using MongoDB.Bson.Serialization.Attributes;
-
-namespace ETModel
-{
-	public class StartConfig: Entity
-	{
-		public int AppId { get; set; }
-
-		[BsonRepresentation(BsonType.String)]
-		public AppType AppType { get; set; }
-
-		public string ServerIP { get; set; }
-	}
-}

+ 1 - 1
Server/Model/Entity/Game.cs

@@ -12,7 +12,7 @@
 				{
 					return scene;
 				}
-				scene = new Scene();
+				scene = new Scene() { Name = "ClientModel" };
 				scene.AddComponent<TimerComponent>();
 				return scene;
 			}

+ 0 - 9
Server/Model/Module/Config/AConfigComponent.cs

@@ -1,9 +0,0 @@
-namespace ETModel
-{
-	/// <summary>
-	/// 每个Config的基类
-	/// </summary>
-	public abstract class AConfigComponent: Component, ISerializeToEntity
-	{
-	}
-}

+ 0 - 0
Server/Model/Entity/Config/UnitConfig.cs → Server/Model/Module/Demo/UnitConfig.cs


+ 0 - 0
Server/Model/Entity/Http.cs → Server/Model/Module/Http/Http.cs


+ 6 - 0
Server/Model/Server.Model.csproj

@@ -83,12 +83,18 @@
     <Compile Include="..\..\Unity\Assets\Model\Base\UnityMath\Vector4.cs">
       <Link>Base\UnityMath\Vector4.cs</Link>
     </Compile>
+    <Compile Include="..\..\Unity\Assets\Model\Component\Config\StartConfig.cs">
+      <Link>Component\Config\StartConfig.cs</Link>
+    </Compile>
     <Compile Include="..\..\Unity\Assets\Model\Module\ActorLocation\IActorLocationMessage.cs">
       <Link>Module\ActorLocation\IActorLocationMessage.cs</Link>
     </Compile>
     <Compile Include="..\..\Unity\Assets\Model\Module\Actor\IActorMessage.cs">
       <Link>Module\Actor\IActorMessage.cs</Link>
     </Compile>
+    <Compile Include="..\..\Unity\Assets\Model\Module\Config\AConfigComponent.cs">
+      <Link>Module\Config\AConfigComponent.cs</Link>
+    </Compile>
     <Compile Include="..\..\Unity\Assets\Model\Module\Message\MessagePool.cs">
       <Link>Module\Message\MessagePool\ETModel\MessagePool.cs</Link>
     </Compile>

+ 290 - 205
Unity/Assets/Bundles/UI/UILobby.prefab

@@ -28,15 +28,15 @@ RectTransform:
   m_GameObject: {fileID: 1079526253439354}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1.0000473, y: 1.0000473, z: 1.0000473}
+  m_LocalScale: {x: 1.0000474, y: 1.0000474, z: 1.0000474}
   m_Children:
-  - {fileID: 8024546321895253580}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 6091766623790896557}
+  m_Father: {fileID: 4771239781044397799}
   m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -170, y: 84}
+  m_AnchoredPosition: {x: -855, y: -258.5}
   m_SizeDelta: {x: 203.5, y: 62.2}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222380373709470286
@@ -127,9 +127,9 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 224438795553994780}
-  - component: {fileID: 222767206446386334}
-  - component: {fileID: 114768094896805158}
-  - component: {fileID: 114555749707205438}
+  - component: {fileID: 1431576037130298801}
+  - component: {fileID: 1431576037130298800}
+  - component: {fileID: 1431576037130298803}
   - component: {fileID: 114905074804487618}
   m_Layer: 5
   m_Name: UILobby
@@ -147,31 +147,39 @@ RectTransform:
   m_GameObject: {fileID: 1386170326414932}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_LocalScale: {x: 0, y: 0, z: 0}
   m_Children:
-  - {fileID: 224934188340226432}
-  - {fileID: 224454870451404706}
-  - {fileID: 224785799260186348}
-  - {fileID: 224157525772972440}
-  - {fileID: 224207273919312696}
-  - {fileID: 8025184234707133776}
+  - {fileID: 4771239781044397799}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 1, y: 1}
+  m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &222767206446386334
-CanvasRenderer:
+  m_Pivot: {x: 0, y: 0}
+--- !u!223 &1431576037130298801
+Canvas:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1386170326414932}
-  m_CullTransparentMesh: 0
---- !u!114 &114768094896805158
+  m_Enabled: 1
+  serializedVersion: 3
+  m_RenderMode: 1
+  m_Camera: {fileID: 0}
+  m_PlaneDistance: 100
+  m_PixelPerfect: 0
+  m_ReceivesEvents: 1
+  m_OverrideSorting: 0
+  m_OverridePixelPerfect: 0
+  m_SortingBucketNormalizedSize: 0
+  m_AdditionalShaderChannelsFlag: 0
+  m_SortingLayerID: 0
+  m_SortingOrder: 0
+  m_TargetDisplay: 0
+--- !u!114 &1431576037130298800
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -180,27 +188,20 @@ MonoBehaviour:
   m_GameObject: {fileID: 1386170326414932}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0, g: 0, b: 0, a: 1}
-  m_RaycastTarget: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
-      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-  m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
-  m_Type: 1
-  m_PreserveAspect: 0
-  m_FillCenter: 1
-  m_FillMethod: 4
-  m_FillAmount: 1
-  m_FillClockwise: 1
-  m_FillOrigin: 0
-  m_UseSpriteMesh: 0
---- !u!114 &114555749707205438
+  m_UiScaleMode: 1
+  m_ReferencePixelsPerUnit: 100
+  m_ScaleFactor: 1
+  m_ReferenceResolution: {x: 1920, y: 1080}
+  m_ScreenMatchMode: 0
+  m_MatchWidthOrHeight: 0
+  m_PhysicalUnit: 3
+  m_FallbackScreenDPI: 96
+  m_DefaultSpriteDPI: 96
+  m_DynamicPixelsPerUnit: 1
+--- !u!114 &1431576037130298803
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -209,10 +210,14 @@ MonoBehaviour:
   m_GameObject: {fileID: 1386170326414932}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 8347f75bbf20473292de676504ad7398, type: 3}
+  m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  CanvasName: LobbyCanvas
+  m_IgnoreReversedGraphics: 1
+  m_BlockingObjects: 0
+  m_BlockingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
 --- !u!114 &114905074804487618
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -237,86 +242,7 @@ MonoBehaviour:
   - key: EnterMap
     gameObject: {fileID: 1704477870053320}
   - key: Text
-    gameObject: {fileID: 7801445303893727504}
---- !u!1 &1542152125762418
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 224644746878154546}
-  - component: {fileID: 222381835645352664}
-  - component: {fileID: 114742462078308992}
-  m_Layer: 5
-  m_Name: Text
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &224644746878154546
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1542152125762418}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_Children: []
-  m_Father: {fileID: 224934188340226432}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &222381835645352664
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1542152125762418}
-  m_CullTransparentMesh: 0
---- !u!114 &114742462078308992
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1542152125762418}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
-  m_RaycastTarget: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
-      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-  m_FontData:
-    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
-    m_FontSize: 14
-    m_FontStyle: 0
-    m_BestFit: 0
-    m_MinSize: 10
-    m_MaxSize: 40
-    m_Alignment: 4
-    m_AlignByGeometry: 0
-    m_RichText: 1
-    m_HorizontalOverflow: 0
-    m_VerticalOverflow: 0
-    m_LineSpacing: 1
-  m_Text: "\u4F20\u9001\u5230\u5730\u56FE1"
+    gameObject: {fileID: 6310363376444861169}
 --- !u!1 &1704477870053320
 GameObject:
   m_ObjectHideFlags: 0
@@ -345,15 +271,15 @@ RectTransform:
   m_GameObject: {fileID: 1704477870053320}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 0.99996424, y: 0.99996424, z: 0.99996424}
+  m_LocalScale: {x: 0.9999643, y: 0.9999643, z: 0.9999643}
   m_Children:
-  - {fileID: 8024356082969558570}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 6091851263027039691}
+  m_Father: {fileID: 4771239781044397799}
   m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 0, y: 236.1}
+  m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 203.5, y: 62.2}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222249696585971766
@@ -463,15 +389,15 @@ RectTransform:
   m_GameObject: {fileID: 1743776465676028}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1.0000473, y: 1.0000473, z: 1.0000473}
+  m_LocalScale: {x: 1.0000474, y: 1.0000474, z: 1.0000474}
   m_Children:
-  - {fileID: 8024743306938933382}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 6092027381534495591}
+  m_Father: {fileID: 4771239781044397799}
   m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 183, y: 0.00003624}
+  m_AnchoredPosition: {x: -502, y: -342.49997}
   m_SizeDelta: {x: 203.5, y: 62.2}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222360871743852644
@@ -579,17 +505,17 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1847831622444348}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
-  - {fileID: 224644746878154546}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 8025184234707133776}
+  m_Father: {fileID: 4771239781044397799}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 183, y: 84}
+  m_AnchoredPosition: {x: -502, y: -258.5}
   m_SizeDelta: {x: 203.5, y: 62.2}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222247062704686742
@@ -699,15 +625,15 @@ RectTransform:
   m_GameObject: {fileID: 1947784362988278}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1.0000473, y: 1.0000473, z: 1.0000473}
+  m_LocalScale: {x: 1.0000474, y: 1.0000474, z: 1.0000474}
   m_Children:
-  - {fileID: 8025331633712470308}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 6091421673359928005}
+  m_Father: {fileID: 4771239781044397799}
   m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -170, y: 0.000099182}
+  m_AnchoredPosition: {x: -855, y: -342.4999}
   m_SizeDelta: {x: 203.5, y: 62.2}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222196130204054116
@@ -789,7 +715,166 @@ MonoBehaviour:
       m_Calls: []
     m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
       Culture=neutral, PublicKeyToken=null
---- !u!1 &7800985416197299494
+--- !u!1 &3318750498554037093
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 4771239781044397799}
+  - component: {fileID: 7279718688677780413}
+  - component: {fileID: 1396409096631843897}
+  m_Layer: 5
+  m_Name: Panel
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &4771239781044397799
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3318750498554037093}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children:
+  - {fileID: 224934188340226432}
+  - {fileID: 224454870451404706}
+  - {fileID: 224785799260186348}
+  - {fileID: 224157525772972440}
+  - {fileID: 224207273919312696}
+  - {fileID: 6091551359588390577}
+  m_Father: {fileID: 224438795553994780}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7279718688677780413
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3318750498554037093}
+  m_CullTransparentMesh: 0
+--- !u!114 &1396409096631843897
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3318750498554037093}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 0.392}
+  m_RaycastTarget: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+  m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+--- !u!1 &6310363376444861169
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6091551359588390577}
+  - component: {fileID: 6089323556358314843}
+  - component: {fileID: 6197011583270449923}
+  m_Layer: 5
+  m_Name: Text
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6091551359588390577
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6310363376444861169}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 4771239781044397799}
+  m_RootOrder: 5
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: -683.2, y: -233}
+  m_SizeDelta: {x: 388, y: 72.3}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &6089323556358314843
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6310363376444861169}
+  m_CullTransparentMesh: 0
+--- !u!114 &6197011583270449923
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6310363376444861169}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+  m_FontData:
+    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+    m_FontSize: 20
+    m_FontStyle: 0
+    m_BestFit: 0
+    m_MinSize: 2
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: 
+--- !u!1 &6310388644354827017
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -797,9 +882,9 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 8024356082969558570}
-  - component: {fileID: 8022915815696355158}
-  - component: {fileID: 7915032530824646958}
+  - component: {fileID: 6092027381534495591}
+  - component: {fileID: 6089324637856993735}
+  - component: {fileID: 6197346082856435563}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -807,18 +892,18 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &8024356082969558570
+--- !u!224 &6092027381534495591
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7800985416197299494}
+  m_GameObject: {fileID: 6310388644354827017}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224207273919312696}
+  m_Father: {fileID: 224454870451404706}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -826,21 +911,21 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8022915815696355158
+--- !u!222 &6089324637856993735
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7800985416197299494}
+  m_GameObject: {fileID: 6310388644354827017}
   m_CullTransparentMesh: 0
---- !u!114 &7915032530824646958
+--- !u!114 &6197346082856435563
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7800985416197299494}
+  m_GameObject: {fileID: 6310388644354827017}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -867,8 +952,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u8FDB\u5165\u5730\u56FE"
---- !u!1 &7801445303893727504
+  m_Text: "\u4F20\u9001\u5230\u5730\u56FE2"
+--- !u!1 &6310594014624232091
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -876,9 +961,9 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 8025184234707133776}
-  - component: {fileID: 8022943547382507706}
-  - component: {fileID: 7914674020489363682}
+  - component: {fileID: 6091421673359928005}
+  - component: {fileID: 6093232050015099385}
+  - component: {fileID: 6197238338104472987}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -886,47 +971,47 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &8025184234707133776
+--- !u!224 &6091421673359928005
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801445303893727504}
+  m_GameObject: {fileID: 6310594014624232091}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224438795553994780}
-  m_RootOrder: 5
+  m_Father: {fileID: 224157525772972440}
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0.5, y: 0.5}
-  m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 1.8, y: 109.5}
-  m_SizeDelta: {x: 388, y: 72.3}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8022943547382507706
+--- !u!222 &6093232050015099385
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801445303893727504}
+  m_GameObject: {fileID: 6310594014624232091}
   m_CullTransparentMesh: 0
---- !u!114 &7914674020489363682
+--- !u!114 &6197238338104472987
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801445303893727504}
+  m_GameObject: {fileID: 6310594014624232091}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
   m_RaycastTarget: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
@@ -935,10 +1020,10 @@ MonoBehaviour:
       Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
   m_FontData:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
-    m_FontSize: 20
+    m_FontSize: 14
     m_FontStyle: 0
     m_BestFit: 0
-    m_MinSize: 2
+    m_MinSize: 10
     m_MaxSize: 40
     m_Alignment: 4
     m_AlignByGeometry: 0
@@ -946,8 +1031,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: 
---- !u!1 &7801673778466570618
+  m_Text: "\u53D1\u9001ActorRpc_Test"
+--- !u!1 &6310665146747551091
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -955,9 +1040,9 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 8025331633712470308}
-  - component: {fileID: 8023485309858884120}
-  - component: {fileID: 7914975508041746042}
+  - component: {fileID: 6091766623790896557}
+  - component: {fileID: 6089840241912571479}
+  - component: {fileID: 6201356226212752953}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -965,18 +1050,18 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &8025331633712470308
+--- !u!224 &6091766623790896557
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801673778466570618}
+  m_GameObject: {fileID: 6310665146747551091}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224157525772972440}
+  m_Father: {fileID: 224785799260186348}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -984,21 +1069,21 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8023485309858884120
+--- !u!222 &6089840241912571479
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801673778466570618}
+  m_GameObject: {fileID: 6310665146747551091}
   m_CullTransparentMesh: 0
---- !u!114 &7914975508041746042
+--- !u!114 &6201356226212752953
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801673778466570618}
+  m_GameObject: {fileID: 6310665146747551091}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -1025,8 +1110,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u53D1\u9001ActorRpc_Test"
---- !u!1 &7801742677238320786
+  m_Text: "\u53D1\u9001Actor_Test"
+--- !u!1 &6310684107947486919
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -1034,9 +1119,9 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 8024546321895253580}
-  - component: {fileID: 8022549528371205558}
-  - component: {fileID: 7915361687774535128}
+  - component: {fileID: 6091851263027039691}
+  - component: {fileID: 6089350792453110967}
+  - component: {fileID: 6197374215665885903}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -1044,18 +1129,18 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &8024546321895253580
+--- !u!224 &6091851263027039691
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801742677238320786}
+  m_GameObject: {fileID: 6310684107947486919}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224785799260186348}
+  m_Father: {fileID: 224207273919312696}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -1063,21 +1148,21 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8022549528371205558
+--- !u!222 &6089350792453110967
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801742677238320786}
+  m_GameObject: {fileID: 6310684107947486919}
   m_CullTransparentMesh: 0
---- !u!114 &7915361687774535128
+--- !u!114 &6197374215665885903
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801742677238320786}
+  m_GameObject: {fileID: 6310684107947486919}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -1104,8 +1189,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u53D1\u9001Actor_Test"
---- !u!1 &7801824641373524200
+  m_Text: "\u8FDB\u5165\u5730\u56FE"
+--- !u!1 &7801445303893727504
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -1113,9 +1198,9 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 8024743306938933382}
-  - component: {fileID: 8022889352635408934}
-  - component: {fileID: 7915008485749165194}
+  - component: {fileID: 8025184234707133776}
+  - component: {fileID: 8022943547382507706}
+  - component: {fileID: 7914674020489363682}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -1123,18 +1208,18 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &8024743306938933382
+--- !u!224 &8025184234707133776
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801824641373524200}
+  m_GameObject: {fileID: 7801445303893727504}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224454870451404706}
+  m_Father: {fileID: 224934188340226432}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -1142,21 +1227,21 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8022889352635408934
+--- !u!222 &8022943547382507706
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801824641373524200}
+  m_GameObject: {fileID: 7801445303893727504}
   m_CullTransparentMesh: 0
---- !u!114 &7915008485749165194
+--- !u!114 &7914674020489363682
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 7801824641373524200}
+  m_GameObject: {fileID: 7801445303893727504}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -1183,4 +1268,4 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u4F20\u9001\u5230\u5730\u56FE2"
+  m_Text: "\u4F20\u9001\u5230\u5730\u56FE1"

+ 187 - 102
Unity/Assets/Bundles/UI/UILogin.prefab

@@ -88,9 +88,9 @@ GameObject:
   serializedVersion: 6
   m_Component:
   - component: {fileID: 224438795553994780}
-  - component: {fileID: 222767206446386334}
-  - component: {fileID: 114768094896805158}
-  - component: {fileID: 114699130285514482}
+  - component: {fileID: 3539700472237229061}
+  - component: {fileID: 3539700472237229082}
+  - component: {fileID: 3539700472237229083}
   - component: {fileID: 114850350457908736}
   m_Layer: 5
   m_Name: UILogin
@@ -108,28 +108,39 @@ RectTransform:
   m_GameObject: {fileID: 1386170326414932}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_LocalScale: {x: 0, y: 0, z: 0}
   m_Children:
-  - {fileID: 224922312697997914}
-  - {fileID: 224944102343361862}
-  - {fileID: 224532636050568724}
+  - {fileID: 587485265287676898}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
-  m_AnchorMax: {x: 1, y: 1}
+  m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &222767206446386334
-CanvasRenderer:
+  m_Pivot: {x: 0, y: 0}
+--- !u!223 &3539700472237229061
+Canvas:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1386170326414932}
-  m_CullTransparentMesh: 0
---- !u!114 &114768094896805158
+  m_Enabled: 1
+  serializedVersion: 3
+  m_RenderMode: 1
+  m_Camera: {fileID: 0}
+  m_PlaneDistance: 100
+  m_PixelPerfect: 0
+  m_ReceivesEvents: 1
+  m_OverrideSorting: 0
+  m_OverridePixelPerfect: 0
+  m_SortingBucketNormalizedSize: 0
+  m_AdditionalShaderChannelsFlag: 0
+  m_SortingLayerID: 0
+  m_SortingOrder: 0
+  m_TargetDisplay: 0
+--- !u!114 &3539700472237229082
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -138,27 +149,20 @@ MonoBehaviour:
   m_GameObject: {fileID: 1386170326414932}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 0, g: 0, b: 0, a: 1}
-  m_RaycastTarget: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
-      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
-  m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
-  m_Type: 1
-  m_PreserveAspect: 0
-  m_FillCenter: 1
-  m_FillMethod: 4
-  m_FillAmount: 1
-  m_FillClockwise: 1
-  m_FillOrigin: 0
-  m_UseSpriteMesh: 0
---- !u!114 &114699130285514482
+  m_UiScaleMode: 1
+  m_ReferencePixelsPerUnit: 100
+  m_ScaleFactor: 1
+  m_ReferenceResolution: {x: 1920, y: 1080}
+  m_ScreenMatchMode: 0
+  m_MatchWidthOrHeight: 0
+  m_PhysicalUnit: 3
+  m_FallbackScreenDPI: 96
+  m_DefaultSpriteDPI: 96
+  m_DynamicPixelsPerUnit: 1
+--- !u!114 &3539700472237229083
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -167,10 +171,14 @@ MonoBehaviour:
   m_GameObject: {fileID: 1386170326414932}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 8347f75bbf20473292de676504ad7398, type: 3}
+  m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  CanvasName: LoginCanvas
+  m_IgnoreReversedGraphics: 1
+  m_BlockingObjects: 0
+  m_BlockingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
 --- !u!114 &114850350457908736
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -184,12 +192,12 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   data:
-  - key: LoginBtn
-    gameObject: {fileID: 1920061237828514}
   - key: Account
     gameObject: {fileID: 1670632076201042}
   - key: Password
     gameObject: {fileID: 1568484768885604}
+  - key: LoginBtn
+    gameObject: {fileID: 1920061237828514}
 --- !u!1 &1568484768885604
 GameObject:
   m_ObjectHideFlags: 0
@@ -218,16 +226,16 @@ RectTransform:
   m_GameObject: {fileID: 1568484768885604}
   m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 0.9999976, y: 0.9999976, z: 0.9999976}
+  m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
-  - {fileID: 6724241717554464570}
-  - {fileID: 6724059120392428446}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 7804391689156063189}
+  - {fileID: 7804495125810082673}
+  m_Father: {fileID: 587485265287676898}
   m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -1.0001, y: 38}
+  m_AnchoredPosition: {x: 0.000061035, y: 39}
   m_SizeDelta: {x: 263.5, y: 43.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222162039596540310
@@ -304,8 +312,8 @@ MonoBehaviour:
     m_DisabledTrigger: Disabled
   m_Interactable: 1
   m_TargetGraphic: {fileID: 114107327146574444}
-  m_TextComponent: {fileID: 6907211139966013604}
-  m_Placeholder: {fileID: 6905316321471513322}
+  m_TextComponent: {fileID: 7981747693348304971}
+  m_Placeholder: {fileID: 7983499266119068165}
   m_ContentType: 7
   m_InputType: 2
   m_AsteriskChar: 42
@@ -357,18 +365,18 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1670632076201042}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
   - {fileID: 224608071536574582}
   - {fileID: 224073640819989714}
-  m_Father: {fileID: 224438795553994780}
+  m_Father: {fileID: 587485265287676898}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -1.0001, y: 99}
+  m_AnchoredPosition: {x: 0, y: 95}
   m_SizeDelta: {x: 263.5, y: 43.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222749306122254412
@@ -577,17 +585,17 @@ RectTransform:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1920061237828514}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children:
-  - {fileID: 6723960202596885412}
-  m_Father: {fileID: 224438795553994780}
+  - {fileID: 7804673277162195787}
+  m_Father: {fileID: 587485265287676898}
   m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -1, y: -33}
+  m_AnchoredPosition: {x: 0.000061035, y: -31.15}
   m_SizeDelta: {x: 263.5, y: 62.3}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &222002149542603454
@@ -669,7 +677,7 @@ MonoBehaviour:
       m_Calls: []
     m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
       Culture=neutral, PublicKeyToken=null
---- !u!1 &6794259768821592594
+--- !u!1 &7873383034294747804
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -677,28 +685,31 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 6723960202596885412}
-  - component: {fileID: 6727047274794804628}
-  - component: {fileID: 6907390783935023534}
+  - component: {fileID: 587485265287676898}
+  - component: {fileID: 472622439637420277}
+  - component: {fileID: 7112356912848213450}
   m_Layer: 5
-  m_Name: Text
+  m_Name: Panel
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &6723960202596885412
+--- !u!224 &587485265287676898
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794259768821592594}
+  m_GameObject: {fileID: 7873383034294747804}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
-  m_Children: []
-  m_Father: {fileID: 224532636050568724}
+  m_Children:
+  - {fileID: 224922312697997914}
+  - {fileID: 224944102343361862}
+  - {fileID: 224532636050568724}
+  m_Father: {fileID: 224438795553994780}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -706,21 +717,95 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &6727047274794804628
+--- !u!222 &472622439637420277
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794259768821592594}
+  m_GameObject: {fileID: 7873383034294747804}
   m_CullTransparentMesh: 0
---- !u!114 &6907390783935023534
+--- !u!114 &7112356912848213450
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794259768821592594}
+  m_GameObject: {fileID: 7873383034294747804}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 0.392}
+  m_RaycastTarget: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+    m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
+      Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
+  m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+--- !u!1 &8021071351863473609
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7804495125810082673}
+  - component: {fileID: 7801669090910179115}
+  - component: {fileID: 7981747693348304971}
+  m_Layer: 5
+  m_Name: Text
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &7804495125810082673
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8021071351863473609}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 224944102343361862}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: -0.5}
+  m_SizeDelta: {x: -20, y: -13}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &7801669090910179115
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8021071351863473609}
+  m_CullTransparentMesh: 0
+--- !u!114 &7981747693348304971
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8021071351863473609}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -741,14 +826,14 @@ MonoBehaviour:
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
-    m_Alignment: 4
+    m_Alignment: 3
     m_AlignByGeometry: 0
-    m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_RichText: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u767B\u5F55"
---- !u!1 &6794366712782777046
+  m_Text: 
+--- !u!1 &8022465166342658813
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -756,57 +841,57 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 6724241717554464570}
-  - component: {fileID: 6726821531729625750}
-  - component: {fileID: 6905316321471513322}
+  - component: {fileID: 7804673277162195787}
+  - component: {fileID: 7801588094758374779}
+  - component: {fileID: 7981629239811842369}
   m_Layer: 5
-  m_Name: Placeholder
+  m_Name: Text
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &6724241717554464570
+--- !u!224 &7804673277162195787
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794366712782777046}
+  m_GameObject: {fileID: 8022465166342658813}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
-  m_Father: {fileID: 224944102343361862}
+  m_Father: {fileID: 224532636050568724}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: -0.5}
-  m_SizeDelta: {x: -20, y: -13}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &6726821531729625750
+--- !u!222 &7801588094758374779
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794366712782777046}
+  m_GameObject: {fileID: 8022465166342658813}
   m_CullTransparentMesh: 0
---- !u!114 &6905316321471513322
+--- !u!114 &7981629239811842369
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6794366712782777046}
+  m_GameObject: {fileID: 8022465166342658813}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
+  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
   m_RaycastTarget: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
@@ -816,7 +901,7 @@ MonoBehaviour:
   m_FontData:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
     m_FontSize: 20
-    m_FontStyle: 2
+    m_FontStyle: 0
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
@@ -826,8 +911,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u8BF7\u8F93\u5165\u5BC6\u7801"
---- !u!1 &6795680285149650214
+  m_Text: "\u767B\u5F55"
+--- !u!1 &8022593556554039865
 GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -835,57 +920,57 @@ GameObject:
   m_PrefabAsset: {fileID: 0}
   serializedVersion: 6
   m_Component:
-  - component: {fileID: 6724059120392428446}
-  - component: {fileID: 6726849966595286980}
-  - component: {fileID: 6907211139966013604}
+  - component: {fileID: 7804391689156063189}
+  - component: {fileID: 7801908395781106297}
+  - component: {fileID: 7983499266119068165}
   m_Layer: 5
-  m_Name: Text
+  m_Name: Placeholder
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &6724059120392428446
+--- !u!224 &7804391689156063189
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6795680285149650214}
+  m_GameObject: {fileID: 8022593556554039865}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 224944102343361862}
-  m_RootOrder: 1
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: -0.5}
   m_SizeDelta: {x: -20, y: -13}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &6726849966595286980
+--- !u!222 &7801908395781106297
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6795680285149650214}
+  m_GameObject: {fileID: 8022593556554039865}
   m_CullTransparentMesh: 0
---- !u!114 &6907211139966013604
+--- !u!114 &7983499266119068165
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 6795680285149650214}
+  m_GameObject: {fileID: 8022593556554039865}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+  m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
   m_RaycastTarget: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
@@ -895,14 +980,14 @@ MonoBehaviour:
   m_FontData:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
     m_FontSize: 20
-    m_FontStyle: 0
+    m_FontStyle: 2
     m_BestFit: 0
     m_MinSize: 2
     m_MaxSize: 40
-    m_Alignment: 3
+    m_Alignment: 4
     m_AlignByGeometry: 0
-    m_RichText: 0
-    m_HorizontalOverflow: 1
+    m_RichText: 1
+    m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: 
+  m_Text: "\u8BF7\u8F93\u5165\u5BC6\u7801"

+ 1 - 1
Unity/Assets/Hotfix/UI/UILogin/Factory.meta → Unity/Assets/Editor/ComponentViewEditor.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 89f1159a00283084d9c5f7cd3f5d4b50
+guid: c21d447f26b99ec4fab0de98860bba8d
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 91 - 0
Unity/Assets/Editor/ComponentViewEditor/ComponentViewEditor.cs

@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using ETModel;
+using ILRuntime.Runtime.Intepreter;
+using UnityEditor;
+using UnityEngine;
+using Component = ETModel.Component;
+
+namespace ETEditor
+{
+    [CustomEditor(typeof (ComponentView))]
+    public class ComponentViewEditor: Editor
+    {
+        public override void OnInspectorGUI()
+        {
+            ComponentView componentView = (ComponentView) target;
+            object component = componentView.Component;
+            if (component.GetType() == typeof (ILTypeInstance))
+            {
+                return;
+            }
+            ComponentViewHelper.Draw(component);
+        }
+    }
+
+    public static class ComponentViewHelper
+    {
+        private static readonly List<ITypeDrawer> typeDrawers = new List<ITypeDrawer>();
+
+        static ComponentViewHelper()
+        {
+            Assembly assembly = typeof (ComponentViewHelper).Assembly;
+            foreach (Type type in assembly.GetTypes())
+            {
+                if (!type.IsDefined(typeof (TypeDrawerAttribute)))
+                {
+                    continue;
+                }
+
+                ITypeDrawer iTypeDrawer = (ITypeDrawer) Activator.CreateInstance(type);
+                typeDrawers.Add(iTypeDrawer);
+            }
+        }
+        
+        public static void Draw(object obj)
+        {
+            try
+            {
+                FieldInfo[] fields = obj.GetType()
+                        .GetFields(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy);
+
+                EditorGUILayout.BeginVertical();
+
+                foreach (FieldInfo fieldInfo in fields)
+                {
+                    Type type = fieldInfo.FieldType;
+                    if (type.IsDefined(typeof (HideInInspector), false))
+                    {
+                        continue;
+                    }
+
+                    if (fieldInfo.IsDefined(typeof (HideInInspector), false))
+                    {
+                        continue;
+                    }
+
+                    object value = fieldInfo.GetValue(obj);
+
+                    foreach (ITypeDrawer typeDrawer in typeDrawers)
+                    {
+                        if (!typeDrawer.HandlesType(type))
+                        {
+                            continue;
+                        }
+
+                        value = typeDrawer.DrawAndGetNewValue(type, fieldInfo.Name, value, null);
+                        fieldInfo.SetValue(obj, value);
+                        break;
+                    }
+                }
+
+                EditorGUILayout.EndVertical();
+            }
+            catch (Exception e)
+            {
+                Log.Error($"component view error: {obj.GetType().FullName}");
+            }
+        }
+    }
+}

+ 1 - 1
Unity/Assets/Hotfix/Properties/AssemblyInfo.cs.meta → Unity/Assets/Editor/ComponentViewEditor/ComponentViewEditor.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: a1fd9d2eecbf63842ba6bd386a7305c9
+guid: 460052e8f66296146beda9bb1d5e7758
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Unity/Assets/Hotfix/UI/UILobby/Factory.meta → Unity/Assets/Editor/ComponentViewEditor/Entity.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 5981559c216dc924985fc4de9f66fd4c
+guid: af3c0ee7e83ae6d4f9026eee04fd877c
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 199 - 0
Unity/Assets/Editor/ComponentViewEditor/Entity/EditorLayout.cs

@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    public static class Styles
+    {
+        private static GUIStyle _sectionHeader;
+        private static GUIStyle _sectionContent;
+
+        public static GUIStyle sectionHeader
+        {
+            get
+            {
+                if (Styles._sectionHeader == null)
+                    Styles._sectionHeader = new GUIStyle((GUIStyle) "OL Title");
+                return Styles._sectionHeader;
+            }
+        }
+
+        public static GUIStyle sectionContent
+        {
+            get
+            {
+                if (Styles._sectionContent == null)
+                {
+                    Styles._sectionContent = new GUIStyle((GUIStyle) "OL Box");
+                    Styles._sectionContent.stretchHeight = false;
+                }
+
+                return Styles._sectionContent;
+            }
+        }
+    }
+
+    public static class EditorLayout
+    {
+        private const int DEFAULT_FOLDOUT_MARGIN = 11;
+
+        public static T GetWindow<T>(string title, Vector2 size) where T : EditorWindow
+        {
+            T window = EditorWindow.GetWindow<T>(true, title);
+            window.minSize = window.maxSize = size;
+            return window;
+        }
+
+        public static Texture2D LoadTexture(string label)
+        {
+            string[] assets = AssetDatabase.FindAssets(label);
+            if (assets.Length != 0)
+            {
+                string guid = assets[0];
+                if (guid != null)
+                    return AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(guid));
+            }
+
+            return (Texture2D) null;
+        }
+
+        public static Rect DrawTexture(Texture2D texture)
+        {
+            if (!((UnityEngine.Object) texture != (UnityEngine.Object) null))
+                return new Rect();
+            Rect aspectRect = GUILayoutUtility.GetAspectRect((float) ((double) texture.width / (double) texture.height),
+                new GUILayoutOption[1] { GUILayout.ExpandWidth(true) });
+            GUI.DrawTexture(aspectRect, (Texture) texture, ScaleMode.ScaleAndCrop);
+            return aspectRect;
+        }
+
+        public static bool ObjectFieldButton(string label, string buttonText)
+        {
+            EditorGUILayout.BeginHorizontal();
+            EditorGUILayout.LabelField(label, new GUILayoutOption[1] { GUILayout.Width(146f) });
+            if (buttonText.Length > 24)
+                buttonText = "..." + buttonText.Substring(buttonText.Length - 24);
+            int num = GUILayout.Button(buttonText, EditorStyles.objectField, new GUILayoutOption[0])? 1 : 0;
+            EditorGUILayout.EndHorizontal();
+            return num != 0;
+        }
+
+        public static string ObjectFieldOpenFolderPanel(string label, string buttonText, string defaultPath)
+        {
+            if (!EditorLayout.ObjectFieldButton(label, buttonText))
+                return (string) null;
+            string str = defaultPath ?? "Assets/";
+            if (!Directory.Exists(str))
+                str = "Assets/";
+            return EditorUtility.OpenFolderPanel(label, str, string.Empty).Replace(Directory.GetCurrentDirectory() + "/", string.Empty);
+        }
+
+        public static string ObjectFieldOpenFilePanel(string label, string buttonText, string defaultPath)
+        {
+            if (!EditorLayout.ObjectFieldButton(label, buttonText))
+                return (string) null;
+            string str = defaultPath ?? "Assets/";
+            if (!File.Exists(str))
+                str = "Assets/";
+            return EditorUtility.OpenFilePanel(label, str, "dll").Replace(Directory.GetCurrentDirectory() + "/", string.Empty);
+        }
+
+        public static bool MiniButton(string c)
+        {
+            return EditorLayout.miniButton(c, EditorStyles.miniButton);
+        }
+
+        public static bool MiniButtonLeft(string c)
+        {
+            return EditorLayout.miniButton(c, EditorStyles.miniButtonLeft);
+        }
+
+        public static bool MiniButtonMid(string c)
+        {
+            return EditorLayout.miniButton(c, EditorStyles.miniButtonMid);
+        }
+
+        public static bool MiniButtonRight(string c)
+        {
+            return EditorLayout.miniButton(c, EditorStyles.miniButtonRight);
+        }
+
+        private static bool miniButton(string c, GUIStyle style)
+        {
+            GUILayoutOption[] guiLayoutOptionArray1;
+            if (c.Length != 1)
+                guiLayoutOptionArray1 = new GUILayoutOption[0];
+            else
+                guiLayoutOptionArray1 = new GUILayoutOption[1] { GUILayout.Width(19f) };
+            GUILayoutOption[] guiLayoutOptionArray2 = guiLayoutOptionArray1;
+            int num = GUILayout.Button(c, style, guiLayoutOptionArray2)? 1 : 0;
+            if (num == 0)
+                return num != 0;
+            GUI.FocusControl((string) null);
+            return num != 0;
+        }
+
+        public static bool Foldout(bool foldout, string content, int leftMargin = 11)
+        {
+            return EditorLayout.Foldout(foldout, content, EditorStyles.foldout, leftMargin);
+        }
+
+        public static bool Foldout(bool foldout, string content, GUIStyle style, int leftMargin = 11)
+        {
+            EditorGUILayout.BeginHorizontal();
+            GUILayout.Space((float) leftMargin);
+            foldout = EditorGUILayout.Foldout(foldout, content, style);
+            EditorGUILayout.EndHorizontal();
+            return foldout;
+        }
+
+        public static string SearchTextField(string searchString)
+        {
+            bool changed = GUI.changed;
+            GUILayout.BeginHorizontal();
+            searchString = GUILayout.TextField(searchString, GUI.skin.FindStyle("ToolbarSeachTextField"), new GUILayoutOption[0]);
+            if (GUILayout.Button(string.Empty, GUI.skin.FindStyle("ToolbarSeachCancelButton"), new GUILayoutOption[0]))
+                searchString = string.Empty;
+            GUILayout.EndHorizontal();
+            GUI.changed = changed;
+            return searchString;
+        }
+
+        public static bool MatchesSearchString(string str, string search)
+        {
+            string[] strArray = search.Split(new char[1] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
+            if (strArray.Length != 0)
+                return ((IEnumerable<string>) strArray).Any<string>(new Func<string, bool>(str.Contains));
+            return true;
+        }
+
+        public static bool DrawSectionHeaderToggle(string header, bool value)
+        {
+            return GUILayout.Toggle(value, header, Styles.sectionHeader, new GUILayoutOption[0]);
+        }
+
+        public static void BeginSectionContent()
+        {
+            EditorGUILayout.BeginVertical(Styles.sectionContent, new GUILayoutOption[0]);
+        }
+
+        public static void EndSectionContent()
+        {
+            EditorGUILayout.EndVertical();
+        }
+
+        public static Rect BeginVerticalBox()
+        {
+            return EditorGUILayout.BeginVertical(GUI.skin.box, new GUILayoutOption[0]);
+        }
+
+        public static void EndVerticalBox()
+        {
+            EditorGUILayout.EndVertical();
+        }
+    }
+}

+ 2 - 3
Unity/Assets/Model/Module/UI/IUIFactory.cs.meta → Unity/Assets/Editor/ComponentViewEditor/Entity/EditorLayout.cs.meta

@@ -1,8 +1,7 @@
 fileFormatVersion: 2
-guid: d748ab5ae16fd1c4c88a6114dee06a85
-timeCreated: 1510748010
-licenseType: Free
+guid: 9c97b611a98d6684c8a9d65597fe806c
 MonoImporter:
+  externalObjects: {}
   serializedVersion: 2
   defaultReferences: []
   executionOrder: 0

+ 133 - 0
Unity/Assets/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs

@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text.RegularExpressions;
+
+namespace ETEditor
+{
+    public static class SerializationTypeExtension
+    {
+        private static readonly Dictionary<string, string> _builtInTypesToString = new Dictionary<string, string>()
+        {
+            { "System.Boolean", "bool" },
+            { "System.Byte", "byte" },
+            { "System.SByte", "sbyte" },
+            { "System.Char", "char" },
+            { "System.Decimal", "decimal" },
+            { "System.Double", "double" },
+            { "System.Single", "float" },
+            { "System.Int32", "int" },
+            { "System.UInt32", "uint" },
+            { "System.Int64", "long" },
+            { "System.UInt64", "ulong" },
+            { "System.Object", "object" },
+            { "System.Int16", "short" },
+            { "System.UInt16", "ushort" },
+            { "System.String", "string" },
+            { "System.Void", "void" }
+        };
+
+        private static readonly Dictionary<string, string> _builtInTypeStrings = new Dictionary<string, string>()
+        {
+            { "bool", "System.Boolean" },
+            { "byte", "System.Byte" },
+            { "sbyte", "System.SByte" },
+            { "char", "System.Char" },
+            { "decimal", "System.Decimal" },
+            { "double", "System.Double" },
+            { "float", "System.Single" },
+            { "int", "System.Int32" },
+            { "uint", "System.UInt32" },
+            { "long", "System.Int64" },
+            { "ulong", "System.UInt64" },
+            { "object", "System.Object" },
+            { "short", "System.Int16" },
+            { "ushort", "System.UInt16" },
+            { "string", "System.String" },
+            { "void", "System.Void" }
+        };
+
+        public static string ToCompilableString(this Type type)
+        {
+            if (SerializationTypeExtension._builtInTypesToString.ContainsKey(type.FullName))
+                return SerializationTypeExtension._builtInTypesToString[type.FullName];
+            if (type.IsGenericType)
+            {
+                string str1 = type.FullName.Split('`')[0];
+                string[] array = ((IEnumerable<Type>) type.GetGenericArguments())
+                        .Select<Type, string>((Func<Type, string>) (argType => argType.ToCompilableString())).ToArray<string>();
+                string str2 = "<";
+                string str3 = string.Join(", ", array);
+                string str4 = ">";
+                return str1 + str2 + str3 + str4;
+            }
+
+            if (type.IsArray)
+                return type.GetElementType().ToCompilableString() + "[" + new string(',', type.GetArrayRank() - 1) + "]";
+            if (type.IsNested)
+                return type.FullName.Replace('+', '.');
+            return type.FullName;
+        }
+
+        public static Type ToType(this string typeString)
+        {
+            string typeString1 = SerializationTypeExtension.generateTypeString(typeString);
+            Type type1 = Type.GetType(typeString1);
+            if (type1 != null)
+                return type1;
+            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
+            {
+                Type type2 = assembly.GetType(typeString1);
+                if (type2 != null)
+                    return type2;
+            }
+
+            return (Type) null;
+        }
+
+        public static string ShortTypeName(this string fullTypeName)
+        {
+            string[] strArray = fullTypeName.Split('.');
+            return strArray[strArray.Length - 1];
+        }
+
+        public static string RemoveDots(this string fullTypeName)
+        {
+            return fullTypeName.Replace(".", string.Empty);
+        }
+
+        private static string generateTypeString(string typeString)
+        {
+            if (SerializationTypeExtension._builtInTypeStrings.ContainsKey(typeString))
+            {
+                typeString = SerializationTypeExtension._builtInTypeStrings[typeString];
+            }
+            else
+            {
+                typeString = SerializationTypeExtension.generateGenericArguments(typeString);
+                typeString = SerializationTypeExtension.generateArray(typeString);
+            }
+
+            return typeString;
+        }
+
+        private static string generateGenericArguments(string typeString)
+        {
+            string[] separator = new string[1] { ", " };
+            typeString = Regex.Replace(typeString, "<(?<arg>.*)>", (MatchEvaluator) (m =>
+            {
+                string typeString1 = SerializationTypeExtension.generateTypeString(m.Groups["arg"].Value);
+                return "`" + (object) typeString1.Split(separator, StringSplitOptions.None).Length + "[" + typeString1 + "]";
+            }));
+            return typeString;
+        }
+
+        private static string generateArray(string typeString)
+        {
+            typeString = Regex.Replace(typeString, "(?<type>[^\\[]*)(?<rank>\\[,*\\])",
+                (MatchEvaluator) (m => SerializationTypeExtension.generateTypeString(m.Groups["type"].Value) + m.Groups["rank"].Value));
+            return typeString;
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/Entity/SerializationTypeExtension.cs.meta

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

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/ITypeDrawer.cs

@@ -0,0 +1,11 @@
+using System;
+
+namespace ETEditor
+{
+    public interface ITypeDrawer
+    {
+        bool HandlesType(Type type);
+
+        object DrawAndGetNewValue(Type memberType, string memberName, object value, object target);
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/ITypeDrawer.cs.meta

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

+ 1 - 1
Unity/Assets/Hotfix/Properties.meta → Unity/Assets/Editor/ComponentViewEditor/TypeDrawer.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b7885938330485e4bb887852bb6faeb8
+guid: 661d2de438d55034dba3851e62cc5fe3
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/AnimationCurveTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class AnimationCurveTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (AnimationCurve);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.CurveField(memberName, (AnimationCurve) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/AnimationCurveTypeDrawer.cs.meta

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

+ 19 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoolTypeDrawer.cs

@@ -0,0 +1,19 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class BoolTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (bool);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.Toggle(memberName, (bool) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoolTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoundsTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class BoundsTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Bounds);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.BoundsField(memberName, (Bounds) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/BoundsTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/CharTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class CharTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (char);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            var str = EditorGUILayout.TextField(memberName, ((char) value).ToString());
+            return str.Length > 0? str[0] : default (char);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/CharTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/ColorTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class ColorTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Color);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.ColorField(memberName, (Color) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/ColorTypeDrawer.cs.meta

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

+ 25 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DateTimeTypeDrawer.cs

@@ -0,0 +1,25 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class DateTimeTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (DateTime);
+        }
+
+        // Note: This is a very basic implementation. The ToString() method conversion will cut off milliseconds.
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            var dateString = value.ToString();
+            var newDateString = EditorGUILayout.TextField(memberName, dateString);
+
+            return newDateString != dateString
+                    ? DateTime.Parse(newDateString)
+                    : value;
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DateTimeTypeDrawer.cs.meta

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

+ 19 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DoubleTypeDrawer.cs

@@ -0,0 +1,19 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class DoubleTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (double);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.DoubleField(memberName, (double) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/DoubleTypeDrawer.cs.meta

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

+ 24 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/EnumTypeDrawer.cs

@@ -0,0 +1,24 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class EnumTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type.IsEnum;
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            if (memberType.IsDefined(typeof (FlagsAttribute), false))
+            {
+                return EditorGUILayout.EnumFlagsField(memberName, (Enum) value);
+            }
+
+            return EditorGUILayout.EnumPopup(memberName, (Enum) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/EnumTypeDrawer.cs.meta

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

+ 19 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/FloatTypeDrawer.cs

@@ -0,0 +1,19 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class FloatTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (float);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.FloatField(memberName, (float) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/FloatTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/IntTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class IntTypeDrawer: ITypeDrawer
+    {
+        [TypeDrawer]
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (int);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.IntField(memberName, (int) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/IntTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/LongTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class LongTypeDrawer: ITypeDrawer
+    {
+        [TypeDrawer]
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (long);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.LongField(memberName, (long) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/LongTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/RectTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class RectTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Rect);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.RectField(memberName, (Rect) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/RectTypeDrawer.cs.meta

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

+ 19 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/StringTypeDrawer.cs

@@ -0,0 +1,19 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class StringTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (string);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.DelayedTextField(memberName, (string) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/StringTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/UnityObjectTypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class UnityObjectTypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (UnityEngine.Object) ||
+                    type.IsSubclassOf(typeof (UnityEngine.Object));
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.ObjectField(memberName, (UnityEngine.Object) value, memberType, true);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/UnityObjectTypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector2TypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class Vector2TypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Vector2);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.Vector2Field(memberName, (Vector2) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector2TypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector3TypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class Vector3TypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Vector3);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.Vector3Field(memberName, (Vector3) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector3TypeDrawer.cs.meta

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

+ 20 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector4TypeDrawer.cs

@@ -0,0 +1,20 @@
+using System;
+using UnityEditor;
+using UnityEngine;
+
+namespace ETEditor
+{
+    [TypeDrawer]
+    public class Vector4TypeDrawer: ITypeDrawer
+    {
+        public bool HandlesType(Type type)
+        {
+            return type == typeof (Vector4);
+        }
+
+        public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
+        {
+            return EditorGUILayout.Vector4Field(memberName, (Vector4) value);
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawer/Vector4TypeDrawer.cs.meta

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

+ 8 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawerAttribute.cs

@@ -0,0 +1,8 @@
+using System;
+
+namespace ETEditor
+{
+    public class TypeDrawerAttribute: Attribute
+    {
+    }
+}

+ 11 - 0
Unity/Assets/Editor/ComponentViewEditor/TypeDrawerAttribute.cs.meta

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

+ 2 - 0
Unity/Assets/Hotfix/Base/Event/EventIdType.cs

@@ -3,5 +3,7 @@
 	public static class EventIdType
 	{
 		public const string InitSceneStart = "InitSceneStart";
+		public const string LoginFinish = "LoginFinish";
+		public const string EnterMapFinish = "EnterMapFinish";
 	}
 }

+ 67 - 7
Unity/Assets/Hotfix/Base/Object/Component.cs

@@ -1,5 +1,9 @@
-using ETModel;
+using System;
+using ETModel;
 using MongoDB.Bson.Serialization.Attributes;
+#if UNITY_EDITOR
+using UnityEngine;
+#endif
 
 namespace ETHotfix
 {
@@ -8,6 +12,11 @@ namespace ETHotfix
 	{
 		[BsonIgnore]
 		public long InstanceId { get; protected set; }
+		
+#if !SERVER
+		[BsonIgnore]
+		public GameObject GameObject { get; protected set; }
+#endif
 
 		[BsonIgnore]
 		private bool isFromPool;
@@ -28,8 +37,10 @@ namespace ETHotfix
 					return;
 				}
 
-				this.InstanceId = IdGenerater.GenerateId();
-				Game.EventSystem.Add(this);
+				if (this.InstanceId == 0)
+				{
+					this.InstanceId = IdGenerater.GenerateId();
+				}
 			}
 		}
 
@@ -42,8 +53,36 @@ namespace ETHotfix
 			}
 		}
 
+		private Component parent;
+		
 		[BsonIgnore]
-		public Component Parent { get; set; }
+		public Component Parent
+		{
+			get
+			{
+				return this.parent;
+			}
+			set
+			{
+				this.parent = value;
+
+#if !SERVER
+				if (this.parent == null)
+				{
+					this.GameObject.transform.SetParent(GameObject.Find("/Global").transform, false);
+					return;
+				}
+
+				if (this.GameObject != null)
+				{
+					if (this.parent.GameObject != null)
+					{
+						this.GameObject.transform.SetParent(this.parent.GameObject.transform, false);
+					}
+				}
+#endif
+			}
+		}
 
 		public T GetParent<T>() where T : Component
 		{
@@ -58,12 +97,22 @@ namespace ETHotfix
 				return this.Parent as Entity;
 			}
 		}
-
+		
 		protected Component()
 		{
 			this.InstanceId = IdGenerater.GenerateId();
+#if !SERVER
+			if (!this.GetType().IsDefined(typeof(HideInHierarchy), true))
+			{
+				this.GameObject = new GameObject();
+				this.GameObject.name = this.GetType().Name;
+				this.GameObject.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN);
+				this.GameObject.AddComponent<ComponentView>().Component = this;
+			}
+#endif
 		}
-		
+
+
 		public virtual void Dispose()
 		{
 			if (this.IsDisposed)
@@ -75,18 +124,29 @@ namespace ETHotfix
 			Game.EventSystem.Destroy(this);
 
 			Game.EventSystem.Remove(this.InstanceId);
-
+			
 			this.InstanceId = 0;
 
 			if (this.IsFromPool)
 			{
 				Game.ObjectPool.Recycle(this);
 			}
+			else
+			{
+#if !SERVER
+				UnityEngine.Object.Destroy(this.GameObject);
+#endif
+			}
 		}
 
 		public override void EndInit()
 		{
 			Game.EventSystem.Deserialize(this);
 		}
+		
+		public override string ToString()
+		{
+			return MongoHelper.ToJson(this);
+		}
 	}
 }

+ 202 - 44
Unity/Assets/Hotfix/Base/Object/ComponentFactory.cs

@@ -4,12 +4,22 @@ namespace ETHotfix
 {
 	public static class ComponentFactory
 	{
-		public static Component CreateWithParent(Type type, Component parent)
+		public static Component CreateWithParent(Type type, Component parent, bool fromPool = true)
 		{
-			Component component = Game.ObjectPool.Fetch(type);
+			Component component;
+			if (fromPool)
+			{
+				component = Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (Component)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+
 			component.Parent = parent;
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -17,12 +27,24 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T CreateWithParent<T>(Component parent) where T : Component
+		public static T CreateWithParent<T>(Component parent, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Parent = parent;
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -30,12 +52,24 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T CreateWithParent<T, A>(Component parent, A a) where T : Component
+		public static T CreateWithParent<T, A>(Component parent, A a, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Parent = parent;
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -43,12 +77,24 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T CreateWithParent<T, A, B>(Component parent, A a, B b) where T : Component
+		public static T CreateWithParent<T, A, B>(Component parent, A a, B b, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Parent = parent;
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -56,12 +102,24 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T CreateWithParent<T, A, B, C>(Component parent, A a, B b, C c) where T : Component
+		public static T CreateWithParent<T, A, B, C>(Component parent, A a, B b, C c, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Parent = parent;
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -69,11 +127,23 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T Create<T>() where T : Component
+		public static T Create<T>(bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -81,11 +151,23 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T Create<T, A>(A a) where T : Component
+		public static T Create<T, A>(A a, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -93,11 +175,23 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T Create<T, A, B>(A a, B b) where T : Component
+		public static T Create<T, A, B>(A a, B b, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -105,11 +199,23 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T Create<T, A, B, C>(A a, B b, C c) where T : Component
+		public static T Create<T, A, B, C>(A a, B b, C c, bool fromPool = true) where T : Component
 		{
-			T component = Game.ObjectPool.Fetch<T>();
-			ComponentWithId componentWithId = component as ComponentWithId;
-			if (componentWithId != null)
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+
+			if (component is ComponentWithId componentWithId)
 			{
 				componentWithId.Id = component.InstanceId;
 			}
@@ -117,33 +223,85 @@ namespace ETHotfix
 			return component;
 		}
 
-		public static T CreateWithId<T>(long id) where T : ComponentWithId
+		public static T CreateWithId<T>(long id, bool fromPool = true) where T : ComponentWithId
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Id = id;
 			Game.EventSystem.Awake(component);
 			return component;
 		}
 
-		public static T CreateWithId<T, A>(long id, A a) where T : ComponentWithId
+		public static T CreateWithId<T, A>(long id, A a, bool fromPool = true) where T : ComponentWithId
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Id = id;
 			Game.EventSystem.Awake(component, a);
 			return component;
 		}
 
-		public static T CreateWithId<T, A, B>(long id, A a, B b) where T : ComponentWithId
+		public static T CreateWithId<T, A, B>(long id, A a, B b, bool fromPool = true) where T : ComponentWithId
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Id = id;
 			Game.EventSystem.Awake(component, a, b);
 			return component;
 		}
 
-		public static T CreateWithId<T, A, B, C>(long id, A a, B b, C c) where T : ComponentWithId
+		public static T CreateWithId<T, A, B, C>(long id, A a, B b, C c, bool fromPool = true) where T : ComponentWithId
 		{
-			T component = Game.ObjectPool.Fetch<T>();
+			Type type = typeof (T);
+			
+			T component;
+			if (fromPool)
+			{
+				component = (T)Game.ObjectPool.Fetch(type);
+			}
+			else
+			{
+				component = (T)Activator.CreateInstance(type);	
+			}
+			
+			Game.EventSystem.Add(component);
+			
 			component.Id = id;
 			Game.EventSystem.Awake(component, a, b, c);
 			return component;

+ 2 - 1
Unity/Assets/Hotfix/Entity/Game.cs

@@ -12,7 +12,8 @@
 				{
 					return scene;
 				}
-				scene = new Scene();
+				scene = new Scene() { Name = "ClientHotfix" };
+				scene.GameObject.transform.SetParent(scene.GameObject.transform.Find("/Global"));
 				return scene;
 			}
 		}

+ 0 - 4
Unity/Assets/Hotfix/Entity/Scene.cs

@@ -4,8 +4,6 @@ namespace ETHotfix
 {
 	public sealed class Scene: Entity
 	{
-		public ETModel.Scene ModelScene { get; set; } = new ETModel.Scene();
-
 		public string Name { get; set; }
 
 		public Scene()
@@ -26,8 +24,6 @@ namespace ETHotfix
 			}
 
 			base.Dispose();
-
-			this.ModelScene.Dispose();
 		}
 	}
 }

+ 0 - 2
Unity/Assets/Hotfix/Init.cs

@@ -9,8 +9,6 @@ namespace ETHotfix
 		{
 			try
 			{
-				Game.Scene.ModelScene = ETModel.Game.Scene;
-
 				// 注册热更层回调
 				ETModel.Game.Hotfix.Update = () => { Update(); };
 				ETModel.Game.Hotfix.LateUpdate = () => { LateUpdate(); };

+ 1 - 1
Unity/Assets/Hotfix/UI/UILogin/Event.meta → Unity/Assets/Hotfix/Module/Demo/Helper.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 32037d64c3639944fa8ed1b80bb5fb8a
+guid: ee7f7a7ab542ffe44a0e98a8f7f9ebb9
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 47 - 0
Unity/Assets/Hotfix/Module/Demo/Helper/LoginHelper.cs

@@ -0,0 +1,47 @@
+using System;
+using ETModel;
+
+namespace ETHotfix
+{
+    public static class LoginHelper
+    {
+        public static async ETVoid OnLoginAsync(string account)
+        {
+            try
+            {
+                // 创建一个ETModel层的Session
+                ETModel.Session session = ETModel.Game.Scene.GetComponent<NetOuterComponent>().Create(GlobalConfigComponent.Instance.GlobalProto.Address);
+				
+                // 创建一个ETHotfix层的Session, ETHotfix的Session会通过ETModel层的Session发送消息
+                Session realmSession = ComponentFactory.Create<Session, ETModel.Session>(session);
+                R2C_Login r2CLogin = (R2C_Login) await realmSession.Call(new C2R_Login() { Account = account, Password = "111111" });
+                realmSession.Dispose();
+
+                // 创建一个ETModel层的Session,并且保存到ETModel.SessionComponent中
+                ETModel.Session gateSession = ETModel.Game.Scene.GetComponent<NetOuterComponent>().Create(r2CLogin.Address);
+                ETModel.Game.Scene.AddComponent<ETModel.SessionComponent>().Session = gateSession;
+				
+                // 创建一个ETHotfix层的Session, 并且保存到ETHotfix.SessionComponent中
+                Game.Scene.AddComponent<SessionComponent>().Session = ComponentFactory.Create<Session, ETModel.Session>(gateSession);
+				
+                G2C_LoginGate g2CLoginGate = (G2C_LoginGate)await SessionComponent.Instance.Session.Call(new C2G_LoginGate() { Key = r2CLogin.Key });
+
+                Log.Info("登陆gate成功!");
+
+                // 创建Player
+                Player player = ETModel.ComponentFactory.CreateWithId<Player>(g2CLoginGate.PlayerId);
+                PlayerComponent playerComponent = ETModel.Game.Scene.GetComponent<PlayerComponent>();
+                playerComponent.MyPlayer = player;
+
+                Game.EventSystem.Run(EventIdType.LoginFinish);
+
+                // 测试消息有成员是class类型
+                G2C_PlayerInfo g2CPlayerInfo = (G2C_PlayerInfo) await SessionComponent.Instance.Session.Call(new C2G_PlayerInfo());
+            }
+            catch (Exception e)
+            {
+                Log.Error(e);
+            }
+        } 
+    }
+}

+ 11 - 0
Unity/Assets/Hotfix/Module/Demo/Helper/LoginHelper.cs.meta

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

+ 37 - 0
Unity/Assets/Hotfix/Module/Demo/Helper/MapHelper.cs

@@ -0,0 +1,37 @@
+using System;
+using ETModel;
+
+namespace ETHotfix
+{
+    public static class MapHelper
+    {
+        public static async ETVoid EnterMapAsync()
+        {
+            try
+            {
+                // 加载Unit资源
+                ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
+                await resourcesComponent.LoadBundleAsync($"unit.unity3d");
+
+                // 加载场景资源
+                await ETModel.Game.Scene.GetComponent<ResourcesComponent>().LoadBundleAsync("map.unity3d");
+                // 切换到map场景
+                using (SceneChangeComponent sceneChangeComponent = ETModel.Game.Scene.AddComponent<SceneChangeComponent>())
+                {
+                    await sceneChangeComponent.ChangeSceneAsync(SceneType.Map);
+                }
+				
+                G2C_EnterMap g2CEnterMap = await ETModel.SessionComponent.Instance.Session.Call(new C2G_EnterMap()) as G2C_EnterMap;
+                PlayerComponent.Instance.MyPlayer.UnitId = g2CEnterMap.UnitId;
+				
+                Game.Scene.AddComponent<OperaComponent>();
+				
+                Game.EventSystem.Run(EventIdType.EnterMapFinish);
+            }
+            catch (Exception e)
+            {
+                Log.Error(e);
+            }	
+        }
+    }
+}

+ 11 - 0
Unity/Assets/Hotfix/Module/Demo/Helper/MapHelper.cs.meta

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

+ 8 - 0
Unity/Assets/Hotfix/Module/Demo/UI.meta

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

+ 8 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby.meta

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

+ 0 - 0
Unity/Assets/Hotfix/UI/UILobby/Component.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component.meta


+ 38 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component/UILobbyComponent.cs

@@ -0,0 +1,38 @@
+using ETModel;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace ETHotfix
+{
+	[ObjectSystem]
+	public class UiLobbyComponentSystem : AwakeSystem<UILobbyComponent>
+	{
+		public override void Awake(UILobbyComponent self)
+		{
+			self.Awake();
+		}
+	}
+	
+	public class UILobbyComponent : Component
+	{
+		private GameObject enterMap;
+		private Text text;
+
+		public void Awake()
+		{
+			ReferenceCollector rc = this.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
+			
+			enterMap = rc.Get<GameObject>("EnterMap");
+			enterMap.GetComponent<Button>().onClick.Add(this.EnterMap);
+
+			this.text = rc.Get<GameObject>("Text").GetComponent<Text>();
+		}
+
+		private void EnterMap()
+		{
+			MapHelper.EnterMapAsync().Coroutine();
+		}
+		
+
+	}
+}

+ 0 - 0
Unity/Assets/Hotfix/UI/UILobby/Component/UILobbyComponent.cs.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILobby/Component/UILobbyComponent.cs.meta


+ 8 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System.meta

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

+ 14 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/EnterMapFinish_RemoveLobbyUI.cs

@@ -0,0 +1,14 @@
+using ETModel;
+
+namespace ETHotfix
+{
+	[Event(EventIdType.EnterMapFinish)]
+	public class EnterMapFinish_RemoveLobbyUI: AEvent
+	{
+		public override void Run()
+		{
+			Game.Scene.GetComponent<UIComponent>().Remove(UIType.UILobby);
+			ETModel.Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle(UIType.UILobby.StringToAB());
+		}
+	}
+}

+ 11 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/EnterMapFinish_RemoveLobbyUI.cs.meta

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

+ 14 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/LoginFinish_CreateLobbyUI.cs

@@ -0,0 +1,14 @@
+using ETModel;
+
+namespace ETHotfix
+{
+	[Event(EventIdType.LoginFinish)]
+	public class LoginFinish_CreateLobbyUI: AEvent
+	{
+		public override void Run()
+		{
+			UI ui = UILobbyFactory.Create();
+			Game.Scene.GetComponent<UIComponent>().Add(ui);
+		}
+	}
+}

+ 11 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/LoginFinish_CreateLobbyUI.cs.meta

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

+ 29 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/UILobbyFactory.cs

@@ -0,0 +1,29 @@
+using System;
+using ETModel;
+using UnityEngine;
+
+namespace ETHotfix
+{
+    public static class UILobbyFactory
+    {
+        public static UI Create()
+        {
+	        try
+	        {
+				ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
+		        resourcesComponent.LoadBundle(UIType.UILobby.StringToAB());
+				GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset(UIType.UILobby.StringToAB(), UIType.UILobby);
+				GameObject gameObject = UnityEngine.Object.Instantiate(bundleGameObject);
+		        UI ui = ComponentFactory.Create<UI, string, GameObject>(UIType.UILobby, gameObject, false);
+
+				ui.AddComponent<UILobbyComponent>();
+				return ui;
+	        }
+	        catch (Exception e)
+	        {
+				Log.Error(e);
+		        return null;
+	        }
+		}
+    }
+}

+ 0 - 0
Unity/Assets/Hotfix/UI/UILobby/Factory/UILobbyFactory.cs.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILobby/System/UILobbyFactory.cs.meta


+ 0 - 0
Unity/Assets/Hotfix/UI/UILogin.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILogin.meta


+ 0 - 0
Unity/Assets/Hotfix/UI/UILogin/Component.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component.meta


+ 36 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component/UILoginComponent.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Net;
+using ETModel;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace ETHotfix
+{
+	[ObjectSystem]
+	public class UiLoginComponentSystem : AwakeSystem<UILoginComponent>
+	{
+		public override void Awake(UILoginComponent self)
+		{
+			self.Awake();
+		}
+	}
+	
+	public class UILoginComponent: Component
+	{
+		private GameObject account;
+		private GameObject loginBtn;
+
+		public void Awake()
+		{
+			ReferenceCollector rc = this.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
+			loginBtn = rc.Get<GameObject>("LoginBtn");
+			loginBtn.GetComponent<Button>().onClick.Add(OnLogin);
+			this.account = rc.Get<GameObject>("Account");
+		}
+
+		public void OnLogin()
+		{
+			LoginHelper.OnLoginAsync(this.account.GetComponent<InputField>().text).Coroutine();
+		}
+	}
+}

+ 0 - 0
Unity/Assets/Hotfix/UI/UILogin/Component/UILoginComponent.cs.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILogin/Component/UILoginComponent.cs.meta


+ 8 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System.meta

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

+ 2 - 1
Unity/Assets/Hotfix/UI/UILogin/Event/InitSceneStart_CreateLoginUI.cs → Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/InitSceneStart_CreateLoginUI.cs

@@ -7,7 +7,8 @@ namespace ETHotfix
 	{
 		public override void Run()
 		{
-			UI ui = Game.Scene.GetComponent<UIComponent>().Create(UIType.UILogin);
+			UI ui = UILoginFactory.Create();
+			Game.Scene.GetComponent<UIComponent>().Add(ui);
 		}
 	}
 }

+ 0 - 0
Unity/Assets/Hotfix/UI/UILogin/Event/InitSceneStart_CreateLoginUI.cs.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/InitSceneStart_CreateLoginUI.cs.meta


+ 14 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/LoginFinish_RemoveLoginUI.cs

@@ -0,0 +1,14 @@
+using ETModel;
+
+namespace ETHotfix
+{
+	[Event(EventIdType.LoginFinish)]
+	public class LoginFinish_RemoveLoginUI: AEvent
+	{
+		public override void Run()
+		{
+			Game.Scene.GetComponent<UIComponent>().Remove(UIType.UILogin);
+			ETModel.Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle(UIType.UILogin.StringToAB());
+		}
+	}
+}

+ 11 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/LoginFinish_RemoveLoginUI.cs.meta

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

+ 30 - 0
Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/UILoginFactory.cs

@@ -0,0 +1,30 @@
+using System;
+using ETModel;
+using UnityEngine;
+
+namespace ETHotfix
+{
+    public static class UILoginFactory
+    {
+        public static UI Create()
+        {
+	        try
+	        {
+				ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
+				resourcesComponent.LoadBundle(UIType.UILogin.StringToAB());
+				GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset(UIType.UILogin.StringToAB(), UIType.UILogin);
+				GameObject gameObject = UnityEngine.Object.Instantiate(bundleGameObject);
+
+		        UI ui = ComponentFactory.Create<UI, string, GameObject>(UIType.UILogin, gameObject, false);
+
+				ui.AddComponent<UILoginComponent>();
+				return ui;
+	        }
+	        catch (Exception e)
+	        {
+				Log.Error(e);
+		        return null;
+	        }
+		}
+    }
+}

+ 1 - 1
Unity/Assets/Hotfix/UI/UILogin/Factory/UILoginFactory.cs.meta → Unity/Assets/Hotfix/Module/Demo/UI/UILogin/System/UILoginFactory.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: c750a4d1c7dfd984b80ebf4d8d3f466b
+guid: 99a3515a3921d3545b717f463e09ccf8
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 18 - 1
Unity/Assets/Hotfix/Module/Message/SessionComponent.cs

@@ -15,7 +15,24 @@ namespace ETHotfix
 	{
 		public static SessionComponent Instance;
 
-		public Session Session;
+		private Session session;
+
+		public Session Session
+		{
+			get
+			{
+				return this.session;
+			}
+			set
+			{
+				this.session = value;
+				
+				if (this.session != null)
+				{
+					this.session.Parent = this;
+				}
+			}
+		}
 
 		public void Awake()
 		{

+ 12 - 14
Unity/Assets/Hotfix/Module/UI/UI.cs

@@ -1,34 +1,32 @@
 using System.Collections.Generic;
+using ETModel;
 using UnityEngine;
 
 namespace ETHotfix
 {
-	[ETModel.ObjectSystem]
-	public class UiAwakeSystem : AwakeSystem<UI, GameObject>
+	[ObjectSystem]
+	public class UiAwakeSystem : AwakeSystem<UI, string, GameObject>
 	{
-		public override void Awake(UI self, GameObject gameObject)
+		public override void Awake(UI self, string name, GameObject gameObject)
 		{
-			self.Awake(gameObject);
+
+			self.Awake(name, gameObject);
 		}
 	}
 	
+	[HideInHierarchy]
 	public sealed class UI: Entity
 	{
-		public string Name
-		{
-			get
-			{
-				return this.GameObject.name;
-			}
-		}
-
-		public GameObject GameObject { get; private set; }
+		public string Name { get; private set; }
 
 		public Dictionary<string, UI> children = new Dictionary<string, UI>();
 		
-		public void Awake(GameObject gameObject)
+		public void Awake(string name, GameObject gameObject)
 		{
 			this.children.Clear();
+			gameObject.AddComponent<ComponentView>().Component = this;
+			gameObject.layer = LayerMask.NameToLayer(LayerNames.UI);
+			this.Name = name;
 			this.GameObject = gameObject;
 		}
 

+ 15 - 130
Unity/Assets/Hotfix/Module/UI/UIComponent.cs

@@ -1,158 +1,43 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.Collections.Generic;
 using ETModel;
 using UnityEngine;
 
 namespace ETHotfix
 {
 	[ObjectSystem]
-	public class UiComponentAwakeSystem : AwakeSystem<UIComponent>
+	public class UIComponentAwakeSystem : AwakeSystem<UIComponent>
 	{
 		public override void Awake(UIComponent self)
 		{
-			self.Awake();
+			self.Camera = GameObject.Find("/Global/Camera/UICamera");
 		}
 	}
-
-	[ObjectSystem]
-	public class UiComponentLoadSystem : LoadSystem<UIComponent>
-	{
-		public override void Load(UIComponent self)
-		{
-			self.Load();
-		}
-	}
-
+	
 	/// <summary>
 	/// 管理所有UI
 	/// </summary>
 	public class UIComponent: Component
 	{
-		private GameObject Root;
-		private readonly Dictionary<string, IUIFactory> UiTypes = new Dictionary<string, IUIFactory>();
-		private readonly Dictionary<string, UI> uis = new Dictionary<string, UI>();
-
-		public override void Dispose()
-		{
-			if (this.IsDisposed)
-			{
-				return;
-			}
+		public GameObject Camera;
+		
+		public Dictionary<string, UI> uis = new Dictionary<string, UI>();
 
-			base.Dispose();
-
-			foreach (string type in uis.Keys.ToArray())
-			{
-				UI ui;
-				if (!uis.TryGetValue(type, out ui))
-				{
-					continue;
-				}
-				uis.Remove(type);
-				ui.Dispose();
-			}
-
-			this.UiTypes.Clear();
-			this.uis.Clear();
-		}
-
-		public void Awake()
+		public void Add(UI ui)
 		{
-			this.Root = GameObject.Find("Global/UI/");
-			this.Load();
+			ui.GameObject.GetComponent<Canvas>().worldCamera = this.Camera.GetComponent<Camera>();
+			
+			this.uis.Add(ui.Name, ui);
+			ui.Parent = this;
 		}
 
-		public void Load()
+		public void Remove(string name)
 		{
-			UiTypes.Clear();
-            
-			List<Type> types = Game.EventSystem.GetTypes();
-
-			foreach (Type type in types)
-			{
-				object[] attrs = type.GetCustomAttributes(typeof (UIFactoryAttribute), false);
-				if (attrs.Length == 0)
-				{
-					continue;
-				}
-
-				UIFactoryAttribute attribute = attrs[0] as UIFactoryAttribute;
-				if (UiTypes.ContainsKey(attribute.Type))
-				{
-                    Log.Debug($"已经存在同类UI Factory: {attribute.Type}");
-					throw new Exception($"已经存在同类UI Factory: {attribute.Type}");
-				}
-				object o = Activator.CreateInstance(type);
-				IUIFactory factory = o as IUIFactory;
-				if (factory == null)
-				{
-					Log.Error($"{o.GetType().FullName} 没有继承 IUIFactory");
-					continue;
-				}
-				this.UiTypes.Add(attribute.Type, factory);
-			}
-		}
-
-		public UI Create(string type)
-		{
-			try
-			{
-				UI ui = UiTypes[type].Create(this.GetParent<Scene>(), type, Root);
-                uis.Add(type, ui);
-
-				// 设置canvas
-				string cavasName = ui.GameObject.GetComponent<CanvasConfig>().CanvasName;
-				ui.GameObject.transform.SetParent(this.Root.Get<GameObject>(cavasName).transform, false);
-				return ui;
-			}
-			catch (Exception e)
-			{
-				throw new Exception($"{type} UI 错误: {e}");
-			}
-		}
-
-		public void Add(string type, UI ui)
-		{
-			this.uis.Add(type, ui);
-		}
-
-		public void Remove(string type)
-		{
-			UI ui;
-			if (!uis.TryGetValue(type, out ui))
+			if (!this.uis.TryGetValue(name, out UI ui))
 			{
 				return;
 			}
-            UiTypes[type].Remove(type);
-            uis.Remove(type);
+			this.uis.Remove(name);
 			ui.Dispose();
 		}
-
-		public void RemoveAll()
-		{
-			foreach (string type in this.uis.Keys.ToArray())
-			{
-				UI ui;
-				if (!this.uis.TryGetValue(type, out ui))
-				{
-					continue;
-                }
-                this.uis.Remove(type);
-				ui.Dispose();
-			}
-		}
-
-		public UI Get(string type)
-		{
-			UI ui;
-			this.uis.TryGetValue(type, out ui);
-			return ui;
-		}
-
-		public List<string> GetUITypeList()
-		{
-			return new List<string>(this.uis.Keys);
-		}
 	}
 }

+ 0 - 35
Unity/Assets/Hotfix/Properties/AssemblyInfo.cs

@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("Hotfix")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Hotfix")]
-[assembly: AssemblyCopyright("Copyright ©  2017")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-//将 ComVisible 设置为 false 将使此程序集中的类型
-//对 COM 组件不可见。  如果需要从 COM 访问此程序集中的类型,
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("40533600-4e69-4f7d-a924-e1a3b4127255")]
-
-// 程序集的版本信息由下列四个值组成: 
-//
-//      主版本
-//      次版本
-//      生成号
-//      修订号
-//
-//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
-// 方法是按如下所示使用“*”: :
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 1 - 1
Unity/Assets/Hotfix/UI/UILobby.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 88f784899a3c4d943b740dad7d281cde
+guid: c55b1998b0aab86409830731e2624d3d
 folderAsset: yes
 DefaultImporter:
   externalObjects: {}

+ 0 - 65
Unity/Assets/Hotfix/UI/UILobby/Component/UILobbyComponent.cs

@@ -1,65 +0,0 @@
-using System;
-using ETModel;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace ETHotfix
-{
-	[ObjectSystem]
-	public class UiLobbyComponentSystem : AwakeSystem<UILobbyComponent>
-	{
-		public override void Awake(UILobbyComponent self)
-		{
-			self.Awake();
-		}
-	}
-	
-	public class UILobbyComponent : Component
-	{
-		private GameObject enterMap;
-		private Text text;
-
-		public void Awake()
-		{
-			ReferenceCollector rc = this.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
-			
-			enterMap = rc.Get<GameObject>("EnterMap");
-			enterMap.GetComponent<Button>().onClick.Add(this.EnterMap);
-
-			this.text = rc.Get<GameObject>("Text").GetComponent<Text>();
-		}
-
-		private void EnterMap()
-		{
-			EnterMapAsync().Coroutine();
-		}
-		
-		private async ETVoid EnterMapAsync()
-		{
-			try
-			{
-				// 加载Unit资源
-				ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
-				await resourcesComponent.LoadBundleAsync($"unit.unity3d");
-
-				// 加载场景资源
-				await ETModel.Game.Scene.GetComponent<ResourcesComponent>().LoadBundleAsync("map.unity3d");
-				// 切换到map场景
-				using (SceneChangeComponent sceneChangeComponent = ETModel.Game.Scene.AddComponent<SceneChangeComponent>())
-				{
-					await sceneChangeComponent.ChangeSceneAsync(SceneType.Map);
-				}
-				
-				G2C_EnterMap g2CEnterMap = await ETModel.SessionComponent.Instance.Session.Call(new C2G_EnterMap()) as G2C_EnterMap;
-				PlayerComponent.Instance.MyPlayer.UnitId = g2CEnterMap.UnitId;
-				
-				Game.Scene.AddComponent<OperaComponent>();
-				Game.Scene.GetComponent<UIComponent>().Remove(UIType.UILobby);
-			}
-			catch (Exception e)
-			{
-				Log.Error(e);
-			}	
-		}
-	}
-}

+ 0 - 36
Unity/Assets/Hotfix/UI/UILobby/Factory/UILobbyFactory.cs

@@ -1,36 +0,0 @@
-using System;
-using ETModel;
-using UnityEngine;
-
-namespace ETHotfix
-{
-    [UIFactory(UIType.UILobby)]
-    public class UILobbyFactory : IUIFactory
-    {
-        public UI Create(Scene scene, string type, GameObject gameObject)
-        {
-	        try
-	        {
-				ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
-		        resourcesComponent.LoadBundle($"{type}.unity3d");
-				GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset($"{type}.unity3d", $"{type}");
-				GameObject lobby = UnityEngine.Object.Instantiate(bundleGameObject);
-				lobby.layer = LayerMask.NameToLayer(LayerNames.UI);
-				UI ui = ComponentFactory.Create<UI, GameObject>(lobby);
-
-				ui.AddComponent<UILobbyComponent>();
-				return ui;
-	        }
-	        catch (Exception e)
-	        {
-				Log.Error(e);
-		        return null;
-	        }
-		}
-
-	    public void Remove(string type)
-	    {
-			ETModel.Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"{type}.unity3d");
-		}
-    }
-}

+ 0 - 78
Unity/Assets/Hotfix/UI/UILogin/Component/UILoginComponent.cs

@@ -1,78 +0,0 @@
-using System;
-using System.Net;
-using ETModel;
-using UnityEngine;
-using UnityEngine.UI;
-
-namespace ETHotfix
-{
-	[ObjectSystem]
-	public class UiLoginComponentSystem : AwakeSystem<UILoginComponent>
-	{
-		public override void Awake(UILoginComponent self)
-		{
-			self.Awake();
-		}
-	}
-	
-	public class UILoginComponent: Component
-	{
-		private GameObject account;
-		private GameObject loginBtn;
-
-		public void Awake()
-		{
-			ReferenceCollector rc = this.GetParent<UI>().GameObject.GetComponent<ReferenceCollector>();
-			loginBtn = rc.Get<GameObject>("LoginBtn");
-			loginBtn.GetComponent<Button>().onClick.Add(OnLogin);
-			this.account = rc.Get<GameObject>("Account");
-		}
-
-		public void OnLogin()
-		{
-			OnLoginAsync().Coroutine();
-		}
-
-		public async ETVoid OnLoginAsync()
-		{
-			try
-			{
-				string text = this.account.GetComponent<InputField>().text;
-
-				// 创建一个ETModel层的Session
-				ETModel.Session session = ETModel.Game.Scene.GetComponent<NetOuterComponent>().Create(GlobalConfigComponent.Instance.GlobalProto.Address);
-				
-				// 创建一个ETHotfix层的Session, ETHotfix的Session会通过ETModel层的Session发送消息
-				Session realmSession = ComponentFactory.Create<Session, ETModel.Session>(session);
-				R2C_Login r2CLogin = (R2C_Login) await realmSession.Call(new C2R_Login() { Account = text, Password = "111111" });
-				realmSession.Dispose();
-
-				// 创建一个ETModel层的Session,并且保存到ETModel.SessionComponent中
-				ETModel.Session gateSession = ETModel.Game.Scene.GetComponent<NetOuterComponent>().Create(r2CLogin.Address);
-				ETModel.Game.Scene.AddComponent<ETModel.SessionComponent>().Session = gateSession;
-				
-				// 创建一个ETHotfix层的Session, 并且保存到ETHotfix.SessionComponent中
-				Game.Scene.AddComponent<SessionComponent>().Session = ComponentFactory.Create<Session, ETModel.Session>(gateSession);
-				
-				G2C_LoginGate g2CLoginGate = (G2C_LoginGate)await SessionComponent.Instance.Session.Call(new C2G_LoginGate() { Key = r2CLogin.Key });
-
-				Log.Info("登陆gate成功!");
-
-				// 创建Player
-				Player player = ETModel.ComponentFactory.CreateWithId<Player>(g2CLoginGate.PlayerId);
-				PlayerComponent playerComponent = ETModel.Game.Scene.GetComponent<PlayerComponent>();
-				playerComponent.MyPlayer = player;
-
-				Game.Scene.GetComponent<UIComponent>().Create(UIType.UILobby);
-				Game.Scene.GetComponent<UIComponent>().Remove(UIType.UILogin);
-
-				// 测试消息有成员是class类型
-				G2C_PlayerInfo g2CPlayerInfo = (G2C_PlayerInfo) await SessionComponent.Instance.Session.Call(new C2G_PlayerInfo());
-			}
-			catch (Exception e)
-			{
-				Log.Error(e);
-			}
-		}
-	}
-}

+ 0 - 36
Unity/Assets/Hotfix/UI/UILogin/Factory/UILoginFactory.cs

@@ -1,36 +0,0 @@
-using System;
-using ETModel;
-using UnityEngine;
-
-namespace ETHotfix
-{
-    [UIFactory(UIType.UILogin)]
-    public class UILoginFactory : IUIFactory
-    {
-        public UI Create(Scene scene, string type, GameObject gameObject)
-        {
-	        try
-	        {
-				ResourcesComponent resourcesComponent = ETModel.Game.Scene.GetComponent<ResourcesComponent>();
-				resourcesComponent.LoadBundle($"{type}.unity3d");
-				GameObject bundleGameObject = (GameObject)resourcesComponent.GetAsset($"{type}.unity3d", $"{type}");
-				GameObject login = UnityEngine.Object.Instantiate(bundleGameObject);
-				login.layer = LayerMask.NameToLayer(LayerNames.UI);
-		        UI ui = ComponentFactory.Create<UI, GameObject>(login);
-
-				ui.AddComponent<UILoginComponent>();
-				return ui;
-	        }
-	        catch (Exception e)
-	        {
-				Log.Error(e);
-		        return null;
-	        }
-		}
-
-	    public void Remove(string type)
-	    {
-			ETModel.Game.Scene.GetComponent<ResourcesComponent>().UnloadBundle($"{type}.unity3d");
-	    }
-    }
-}

+ 63 - 4
Unity/Assets/Model/Base/Object/Component.cs

@@ -1,5 +1,9 @@
 using System;
+using ETModel;
 using MongoDB.Bson.Serialization.Attributes;
+#if UNITY_EDITOR
+using UnityEngine;
+#endif
 
 namespace ETModel
 {
@@ -7,7 +11,12 @@ namespace ETModel
 	public abstract class Component : Object, IDisposable
 	{
 		[BsonIgnore]
-		public long InstanceId { get; private set; }
+		public long InstanceId { get; protected set; }
+		
+#if !SERVER
+		[BsonIgnore]
+		public GameObject GameObject { get; protected set; }
+#endif
 
 		[BsonIgnore]
 		private bool isFromPool;
@@ -28,8 +37,10 @@ namespace ETModel
 					return;
 				}
 
-				this.InstanceId = IdGenerater.GenerateId();
-				Game.EventSystem.Add(this);
+				if (this.InstanceId == 0)
+				{
+					this.InstanceId = IdGenerater.GenerateId();
+				}
 			}
 		}
 
@@ -41,9 +52,41 @@ namespace ETModel
 				return this.InstanceId == 0;
 			}
 		}
+
+		private Component parent;
 		
 		[BsonIgnore]
-		public Component Parent { get; set; }
+		public Component Parent
+		{
+			get
+			{
+				return this.parent;
+			}
+			set
+			{
+				this.parent = value;
+
+#if !SERVER
+				if (this.parent == null)
+				{
+					this.GameObject.transform.SetParent(GameObject.Find("/Global").transform, false);
+					return;
+				}
+
+				if (this.GameObject == null)
+				{
+					return;
+				}
+
+				if (this.parent.GameObject == null)
+				{
+					return;
+				}
+
+				this.GameObject.transform.SetParent(this.parent.GameObject.transform, false);
+#endif
+			} 
+		}
 
 		public T GetParent<T>() where T : Component
 		{
@@ -62,8 +105,18 @@ namespace ETModel
 		protected Component()
 		{
 			this.InstanceId = IdGenerater.GenerateId();
+#if !SERVER
+			if (!this.GetType().IsDefined(typeof(HideInHierarchy), true))
+			{
+				this.GameObject = new GameObject();
+				this.GameObject.name = this.GetType().Name;
+				this.GameObject.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN);
+				this.GameObject.AddComponent<ComponentView>().Component = this;
+			}
+#endif
 		}
 
+
 		public virtual void Dispose()
 		{
 			if (this.IsDisposed)
@@ -82,6 +135,12 @@ namespace ETModel
 			{
 				Game.ObjectPool.Recycle(this);
 			}
+			else
+			{
+#if !SERVER
+				UnityEngine.Object.Destroy(this.GameObject);
+#endif
+			}
 		}
 
 		public override void EndInit()

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است