diff --git a/Assets/Mirror/Transports/Telepathy/TelepathyTransport.cs b/Assets/Mirror/Transports/Telepathy/TelepathyTransport.cs index d452d665a..7a1c88dba 100644 --- a/Assets/Mirror/Transports/Telepathy/TelepathyTransport.cs +++ b/Assets/Mirror/Transports/Telepathy/TelepathyTransport.cs @@ -75,11 +75,15 @@ void Awake() Debug.Log("TelepathyTransport initialized!"); } - public override bool Available() - { - // C#'s built in TCP sockets run everywhere except on WebGL - return Application.platform != RuntimePlatform.WebGLPlayer; - } + // C#'s built in TCP sockets run everywhere except on WebGL + // Do not change this back to using Application.platform + // because that doesn't work in the Editor! + public override bool Available() => +#if UNITY_WEBGL + false; +#else + true; +#endif // client private void CreateClient()