Explorar el Código

Entity的components使用别名"C",以免占用空间过多

tanghai hace 7 años
padre
commit
9fbed66235

+ 11 - 0
Unity/Assets/Editor/Helper/ShellHelper.cs.meta

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

+ 1 - 1
Unity/Assets/Scripts/Base/Object/Entity.cs

@@ -8,7 +8,7 @@ namespace ETModel
 	[BsonIgnoreExtraElements]
 	public class Entity : ComponentWithId
 	{
-		[BsonElement]
+		[BsonElement("C")]
 		[BsonIgnoreIfNull]
 		private HashSet<Component> components;
 

+ 1 - 1
Unity/Hotfix/Base/Object/Entity.cs

@@ -8,7 +8,7 @@ namespace ETHotfix
 	[BsonIgnoreExtraElements]
 	public class Entity : ComponentWithId
 	{
-		[BsonElement]
+		[BsonElement("C")]
 		[BsonIgnoreIfNull]
 		private HashSet<Component> components;