fix: Don't set framerate in host mode

This commit is contained in:
Paul Pacheco 2019-04-09 05:50:02 -05:00
parent a2cc14bd20
commit 4644bc4b77

View File

@ -235,7 +235,7 @@ public virtual void ConfigureServerFrameRate()
// * if not in Editor (it doesn't work in the Editor) // * if not in Editor (it doesn't work in the Editor)
// * if not in Host mode // * if not in Host mode
#if !UNITY_EDITOR #if !UNITY_EDITOR
if (!NetworkClient.active) if (!NetworkClient.active && IsHeadless())
{ {
Application.targetFrameRate = serverTickRate; Application.targetFrameRate = serverTickRate;
Debug.Log("Server Tick Rate set to: " + Application.targetFrameRate + " Hz."); Debug.Log("Server Tick Rate set to: " + Application.targetFrameRate + " Hz.");