mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Follow naming conventions in NetworkBehaviour m_NetIdentity (#760)
* Follow naming conventions in NetworkBehaviour m_NetIdentity * Use underscore prefix as per vis' suggestion * renamed to netIdentityCache
This commit is contained in:
parent
1d3b3fcca9
commit
7775801625
@ -34,17 +34,17 @@ public class NetworkBehaviour : MonoBehaviour
|
|||||||
protected readonly List<SyncObject> syncObjects = new List<SyncObject>();
|
protected readonly List<SyncObject> syncObjects = new List<SyncObject>();
|
||||||
|
|
||||||
// NetworkIdentity component caching for easier access
|
// NetworkIdentity component caching for easier access
|
||||||
NetworkIdentity m_netIdentity;
|
NetworkIdentity netIdentityCache;
|
||||||
public NetworkIdentity netIdentity
|
public NetworkIdentity netIdentity
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
m_netIdentity = m_netIdentity ?? GetComponent<NetworkIdentity>();
|
netIdentityCache = netIdentityCache ?? GetComponent<NetworkIdentity>();
|
||||||
if (m_netIdentity == null)
|
if (netIdentityCache == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("There is no NetworkIdentity on " + name + ". Please add one.");
|
Debug.LogError("There is no NetworkIdentity on " + name + ". Please add one.");
|
||||||
}
|
}
|
||||||
return m_netIdentity;
|
return netIdentityCache;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user