AutoConnect
How do I use Auto Connect
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
26 | if (ConnectInUpdate && AutoConnect && !PhotonNetwork.connected) | 1 |
File name: ConnectAndJoinRandom.cs
Copy
24 public virtual void Update()
25 {
26 if (ConnectInUpdate && AutoConnect && !PhotonNetwork.connected)
27 {
28 Debug.Log("Update() was called by Unity. Scene is loaded. Let's connect to the Photon Master Server. Calling: PhotonNetwork.ConnectUsingSettings();");
29
30 ConnectInUpdate = false;
31 PhotonNetwork.ConnectUsingSettings(Version + "."+Application.loadedLevel);
32 }
33 }
AutoConnect 139 lượt xem
Gõ tìm kiếm nhanh...