Remove redundant if

This commit is contained in:
Paul Pacheco 2020-03-25 05:02:04 -05:00
parent 62525a9b4b
commit de768d142f

View File

@ -268,16 +268,13 @@ IEnumerable<NetworkBehaviourInfo> GetNetworkBehaviorInfo(NetworkIdentity identit
List<NetworkBehaviourInfo> behaviourInfos = new List<NetworkBehaviourInfo>(); List<NetworkBehaviourInfo> behaviourInfos = new List<NetworkBehaviourInfo>();
NetworkBehaviour[] behaviours = identity.GetComponents<NetworkBehaviour>(); NetworkBehaviour[] behaviours = identity.GetComponents<NetworkBehaviour>();
if (behaviours.Length > 0) foreach (NetworkBehaviour behaviour in behaviours)
{ {
foreach (NetworkBehaviour behaviour in behaviours) behaviourInfos.Add(new NetworkBehaviourInfo
{ {
behaviourInfos.Add(new NetworkBehaviourInfo name = new GUIContent(behaviour.GetType().FullName),
{ behaviour = behaviour
name = new GUIContent(behaviour.GetType().FullName), });
behaviour = behaviour
});
}
} }
return behaviourInfos; return behaviourInfos;
} }