Instead of using
private class DroneNetworkGroupUpdater : MonoBehaviour
{
private Drone _drone;
private Network.Visibility.Group _networkGroup;
public BasePlayer Controller;
private void Awake()
{
_drone = GetComponent<Drone>();
_networkGroup = _drone.net.group;
}
private void Update()
{
if (Controller == null)
return;
var currentGroup = _drone.net.group;
if (currentGroup != _networkGroup)
{
Controller.net.SwitchSecondaryGroup(currentGroup);
_networkGroup = currentGroup;
}
}
}
}You can try to change drone group to GLOBAL group. Then in theory all the issues with range will be solved, and custom component with update will be not needed