tanghai 2 лет назад
Родитель
Сommit
7a016d7846

+ 1 - 0
Unity/Assets/Scripts/Core/Entity/Entity.cs

@@ -18,6 +18,7 @@ namespace ET
     public partial class Entity: DisposeObject
     {
 #if ENABLE_VIEW && UNITY_EDITOR
+        [BsonIgnore]
         [UnityEngine.HideInInspector]
         public UnityEngine.GameObject ViewGO;
 #endif

+ 4 - 4
Unity/Assets/Scripts/Hotfix/Server/Module/DB/DBComponentSystem.cs

@@ -18,7 +18,7 @@ namespace ET.Server
 
 	    private static IMongoCollection<T> GetCollection<T>(this DBComponent self, string collection = null)
 	    {
-		    return self.database.GetCollection<T>(collection ?? typeof (T).Name);
+		    return self.database.GetCollection<T>(collection ?? typeof (T).FullName);
 	    }
 
 	    private static IMongoCollection<Entity> GetCollection(this DBComponent self, string name)
@@ -113,7 +113,7 @@ namespace ET.Server
 	    {
 		    if (collection == null)
 		    {
-			    collection = typeof (T).Name;
+			    collection = typeof (T).FullName;
 		    }
 		    
 		    using (await self.Fiber().CoroutineLockComponent.Wait(CoroutineLockType.DB, RandomGenerator.RandInt64() % DBComponent.TaskCount))
@@ -130,7 +130,7 @@ namespace ET.Server
 	    {
 		    if (entity == null)
 		    {
-			    Log.Error($"save entity is null: {typeof (T).Name}");
+			    Log.Error($"save entity is null: {typeof (T).FullName}");
 
 			    return;
 		    }
@@ -150,7 +150,7 @@ namespace ET.Server
 	    {
 		    if (entity == null)
 		    {
-			    Log.Error($"save entity is null: {typeof (T).Name}");
+			    Log.Error($"save entity is null: {typeof (T).FullName}");
 
 			    return;
 		    }