Worked on restart button. Unsuccessful, left it disabled.
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
using _PROJECT.NewHandPresence;
|
||||
using FishNet;
|
||||
using FishNet.Discovery;
|
||||
using FishNet.Managing.Scened;
|
||||
using FishNet.Object;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using TMPro;
|
||||
using Unity.XR.CoreUtils;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -61,13 +64,37 @@ public class NetworkMenuUI : MonoBehaviour
|
||||
StartCoroutine(HostAndSearchRoutine());
|
||||
}
|
||||
|
||||
|
||||
private void OnReload()
|
||||
{
|
||||
/*if (!InstanceFinder.IsClient)
|
||||
{
|
||||
Debug.LogWarning("Reload can only be called from a client!");
|
||||
return;
|
||||
}
|
||||
|
||||
//UnityEngine.SceneManagement.Scene currentScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene();
|
||||
//UnityEngine.SceneManagement.SceneManager.LoadScene(currentScene.name);
|
||||
|
||||
// Use the ClientManager.Objects dictionary
|
||||
foreach (NetworkObject obj in InstanceFinder.ClientManager.Objects.)
|
||||
{
|
||||
if (obj.IsOwner) // This ensures it's YOUR local player
|
||||
{
|
||||
var xr = obj.GetComponentInChildren<XROrigin>();
|
||||
if (xr != null)
|
||||
{
|
||||
Debug.Log("Found my XR Origin player.");
|
||||
|
||||
TutorialController tutorial = xr.GetComponent<TutorialController>();
|
||||
if (tutorial != null)
|
||||
{
|
||||
tutorial._state = TutorialController.TutorialState.Initializing;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("My local player is not an XR Origin.");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
private void OnJoinMultiplayer()
|
||||
|
||||
Reference in New Issue
Block a user