NetworkWriter consistent NetworkIdentity naming

This commit is contained in:
vis2k 2018-12-17 23:17:23 +01:00
parent ce78a61f02
commit 3c5ca56045

View File

@ -291,10 +291,10 @@ public void Write(Transform value)
WritePackedUInt32(0); WritePackedUInt32(0);
return; return;
} }
var uv = value.gameObject.GetComponent<NetworkIdentity>(); NetworkIdentity identity = value.gameObject.GetComponent<NetworkIdentity>();
if (uv != null) if (identity != null)
{ {
WritePackedUInt32(uv.netId); WritePackedUInt32(identity.netId);
} }
else else
{ {
@ -310,10 +310,10 @@ public void Write(GameObject value)
WritePackedUInt32(0); WritePackedUInt32(0);
return; return;
} }
var uv = value.GetComponent<NetworkIdentity>(); NetworkIdentity identity = value.GetComponent<NetworkIdentity>();
if (uv != null) if (identity != null)
{ {
WritePackedUInt32(uv.netId); WritePackedUInt32(identity.netId);
} }
else else
{ {