We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f10a307 commit 64e3741Copy full SHA for 64e3741
Runtime/Network/Base/MessageObject.cs
@@ -63,7 +63,7 @@ public virtual void Clear()
63
/// <typeparam name="T">消息类型</typeparam>
64
/// <param name="useJson">是否强制使用 JSON 进行克隆(较慢但兼容性最好)</param>
65
/// <returns>克隆后的对象</returns>
66
- public T DeepClone<T>(bool useJson = false) where T : MessageObject, new()
+ public T DeepClone<T>(bool useJson = false) where T : class, new()
67
{
68
T clone;
69
@@ -92,12 +92,6 @@ public virtual void Clear()
92
#endif
93
}
94
95
- // 确保每个克隆体都有唯一的 ID
96
- if (clone != null)
97
- {
98
- clone.UpdateUniqueId();
99
- }
100
-
101
return clone;
102
103
0 commit comments