You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MLAPI/Core/NetworkedObject.cs
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,15 @@ namespace MLAPI
24
24
publicsealedclassNetworkedObject:MonoBehaviour
25
25
{
26
26
privatevoidOnValidate()
27
+
{
28
+
// Set this so the hash can be serialized on Scene objects. For prefabs, they are generated at runtime.
29
+
ValidateHash();
30
+
}
31
+
32
+
internalvoidValidateHash()
27
33
{
28
34
if(string.IsNullOrEmpty(PrefabHashGenerator))
29
35
{
30
-
PrefabHash=0;
31
-
if(LogHelper.CurrentLogLevel<=LogLevel.Normal)LogHelper.LogWarning("The NetworkedObject "+gameObject.name+" does not have a PrefabHashGenerator. It has been set to the gameObject name");
0 commit comments