NetworkManager: always show OnGUI because snapshot interpolation gui is useful in builds / for debugging as well

This commit is contained in:
vis2k 2022-10-09 10:04:30 +02:00
parent b9bf63790f
commit f1f7b37288

View File

@ -1347,13 +1347,11 @@ public virtual void OnStopClient() {}
/// <summary>This is called when a host is stopped.</summary>
public virtual void OnStopHost() {}
// OnGUI allocates even if it does nothing. avoid in release.
#if UNITY_EDITOR || DEVELOPMENT_BUILD
// keep OnGUI even in builds. useful to debug snap interp.
void OnGUI()
{
if (!timeInterpolationGui) return;
NetworkClient.OnGUI();
}
#endif
}
}