diff --git a/Mirror/Runtime/NetworkWriter.cs b/Mirror/Runtime/NetworkWriter.cs index d1d9c3303..51618455e 100644 --- a/Mirror/Runtime/NetworkWriter.cs +++ b/Mirror/Runtime/NetworkWriter.cs @@ -291,10 +291,10 @@ public void Write(Transform value) WritePackedUInt32(0); return; } - var uv = value.gameObject.GetComponent(); - if (uv != null) + NetworkIdentity identity = value.gameObject.GetComponent(); + if (identity != null) { - WritePackedUInt32(uv.netId); + WritePackedUInt32(identity.netId); } else { @@ -310,10 +310,10 @@ public void Write(GameObject value) WritePackedUInt32(0); return; } - var uv = value.GetComponent(); - if (uv != null) + NetworkIdentity identity = value.GetComponent(); + if (identity != null) { - WritePackedUInt32(uv.netId); + WritePackedUInt32(identity.netId); } else {