Hi guys,
Using both photon or unet (with vr) with latest unity versions 2018 series I got a unity stuck by pressing play button (often), without any error or useful messages (yes even in editor logs in …/AppData/Local/Unity/Editor/editorlog.txt)
This is not a simple unity-not-responding, otherwise a process kill would be enough to solve it.
This makes the process from task manager not killable so I have to restart rawly the pc.
I tried all things to kill that process but it ever remains as background process if not under the main-ones.
Any suggestion/help?
Reproducibility with unet or photon:
- Enable vr support for your project
- Create a code for match creation / joining code
UNET example like in documentation - Unity - Scripting API: NetworkMatch
code preview in text editor of reply is really better than how it looks here
`public class ConnectionHandler : MonoBehaviour
{
///
/// Assign the manager from inspector.
///
public NetworkManager manager;
private void Start()
{
manager.StartMatchMaker();
CreateInternetMatch("Test");
}
//call this method to request a match to be created on the server
public void CreateInternetMatch(string matchName)
{
manager.matchMaker.CreateMatch(matchName, 20, true, "", "", "", 0, 0, OnInternetMatchCreate);
}
//this method is called when your request for creating a match is returned
private void OnInternetMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo)
{
if (success)
{
Debug.Log("Create match succeeded");
MatchInfo hostInfo = matchInfo;
NetworkServer.Listen(hostInfo, 9000);
manager.StartHost(hostInfo);
}
else
{
Debug.LogError("Create match failed: "+extendedInfo);
}
}
}
`
3) for photon happens the same I just followed their examples demos and docs by only changing the aim of ConnectAndJoinRandom to ConnectAndJoinASpecificRoom .