StrixNetworkDestroy Method |
Namespace: SoftGear.Strix.Unity.Runtime
public void Destroy()
using SoftGear.Strix.Unity.Runtime; using UnityEngine; public class StrixConnectAndDestroyExample : MonoBehaviour { void Start() { var strixNetwork = StrixNetwork.instance; strixNetwork.applicationId = "00000000-0000-0000-0000-000000000000"; strixNetwork.ConnectMasterServer( host: "0123456789abcdef01234567.game.strixcloud.net", port: 9122, connectEventHandler: _ => Debug.Log("Connection established."), errorEventHandler: args => Debug.Log("Connection failed. " + args.cause?.Message)); Debug.Log("Connecting to the master server..."); } void OnDestroy() { StrixNetwork.instance.Destroy(); } }