NetworkIdentity.SetLocalPlayer: use foreach

This commit is contained in:
vis2k 2019-04-06 12:42:30 +02:00
parent 1ad3b120b6
commit dac128f036

View File

@ -730,9 +730,8 @@ internal void SetLocalPlayer()
hasAuthority = true;
}
for (int i = 0; i < m_NetworkBehaviours.Length; i++)
foreach (NetworkBehaviour comp in m_NetworkBehaviours)
{
NetworkBehaviour comp = m_NetworkBehaviours[i];
comp.OnStartLocalPlayer();
if (localPlayerAuthority && !originAuthority)