This commit is contained in:
vis2k 2019-02-15 12:43:49 +01:00
parent bc52ff5e62
commit 871fe9a7f4

View File

@ -15,6 +15,13 @@ namespace Mirror
public abstract class Transport : MonoBehaviour
{
// determines if the transport is available for this platform
// by default a transport is available in all platforms except webgl
public virtual bool Available()
{
return Application.platform != RuntimePlatform.WebGLPlayer;
}
// client
[HideInInspector] public UnityEvent OnClientConnected;
[HideInInspector] public UnityEventByteArray OnClientDataReceived;
@ -26,14 +33,6 @@ public abstract class Transport : MonoBehaviour
public abstract bool ClientSend(int channelId, byte[] data);
public abstract void ClientDisconnect();
// determines if the transport is available for this platform
// by default a transport is available in all platforms except webgl
public virtual bool Available()
{
return Application.platform != RuntimePlatform.WebGLPlayer;
}
// server
[HideInInspector] public UnityEventInt OnServerConnected;
[HideInInspector] public UnityEventIntByteArray OnServerDataReceived;