DisableAutoOpenWizard
How do I use Disable Auto Open Wizard
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
345 | if (!PhotonEditor.Current.DisableAutoOpenWizard && PhotonEditor.Current.HostType == ServerSettings.HostingOption.NotSet) | 1 |
File name: PhotonEditor.cs
Copy
336 // called in editor, opens wizard for initial setup, keeps scene PhotonViews up to date and closes connections when compiling (to avoid issues)
337 private static void EditorUpdate()
338 {
339 if (dontCheckPunSetup || PhotonEditor.Current == null)
340 {
341 return;
342 }
343
344 // serverSetting is null when the file gets deleted. otherwise, the wizard should only run once and only if hosting option is not (yet) set
345 if (!PhotonEditor.Current.DisableAutoOpenWizard && PhotonEditor.Current.HostType == ServerSettings.HostingOption.NotSet)
346 {
347 ShowRegistrationWizard();
348 }
349
350 // Workaround for TCP crash. Plus this surpresses any other recompile errors.
351 if (EditorApplication.isCompiling)
352 {
353 if (PhotonNetwork.connected)
354 {
355 if (lastWarning > EditorApplication.timeSinceStartup - 3)
356 {
357 // Prevent error spam
358 Debug.LogWarning(CurrentLang.WarningPhotonDisconnect);
359 lastWarning = EditorApplication.timeSinceStartup;
360 }
361
362 PhotonNetwork.Disconnect();
363 }
364 }
365 }
DisableAutoOpenWizard 125 lượt xem
Gõ tìm kiếm nhanh...