You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
The Editor and Windows Stand Alone version behave the same, regardless of what i am doing, and it doesn't return null when making a network object
Actual behavior:
The Windows player behaves differently than the editor, when i instantiate the chat object it returns null but the editor works
Steps to reproduce:
(not tried these actual steps but have reproduced similar) Add the multiplayer scene into a build, turn off automatically change scenes, make it spawn the chat window/network object on a key press. Build for Windows (debug), log in as host and press that key to spawn the chat object all in one scene, note you get a null reference as the whole GameObject[] is null which should hold your Chat prefab - i believe the whole thing is null, not just it has no entries but could not attach the debugger to my windows build to confirm. Also note, if you do this in the editor in Unity, it is not null.
If you make a scene 0 that doesn't really do anything but go to scene 1 (where you have the multiplayer scene we used before and the Chat on Keypress), then make a windows build the same thing will actually work. I am not sure if you need the forge manager script in scene 0 and have it not destroy on scene change and this is doing something, or just the fact this is all done (the instantiating) in a scene with index != 0 will work regardless. I do know you don't need to become host in scene 0, before spawning chat in scene 1, you can do both these things in scene 1 and it will still work.
[Optional] Discord Username:
Gwom
The text was updated successfully, but these errors were encountered:
I'm not sure I follow what you are describing here. Would you be able to provide a minimal project where I can see what you are trying to describe above.
Also proven reproduce steps would be much appreciated.
@phalasz unfortunately if make a project using basic steps it seems to not be reproducible so it must be some kind of conflict with my setup and slicing it out of the project would take quite a while. I quickly tried the following and the issue does not happen on Windows Player:
Make a project with the multiplayer scene
Turn off Automatic Scene on the NetworkManager prefab
Turn on DontChangeSceneOnConnect on the MutiplayerManager component
Add to the MultiplayerManager.cs at ln 168 else if (Input.GetKeyDown(KeyCode.Q)) NetworkManager.Instance.InstantiateChatManager();
Make a Windows build, run, connect as client and press Q
It is very difficult to see what I am doing that is different to this, and due to another issue I cannot attach my debugger to the windows player. As such, it is difficult to know why I am getting a null reference for the Instantiate but only on the Windows version, not on the Editor. If i can get more details or a more concrete example that would be good but for now, I am unsure how to provide more info (sorry). If you can think of anything that may affect Windows only, to do with scenes that would be good to know.
Version Number and Operating System(s):
03/10/2018-19.53.38,04 Windows, Unity Editor 2019.2.21f1
Expected behavior:
The Editor and Windows Stand Alone version behave the same, regardless of what i am doing, and it doesn't return null when making a network object
Actual behavior:
The Windows player behaves differently than the editor, when i instantiate the chat object it returns null but the editor works
Steps to reproduce:
(not tried these actual steps but have reproduced similar) Add the multiplayer scene into a build, turn off automatically change scenes, make it spawn the chat window/network object on a key press. Build for Windows (debug), log in as host and press that key to spawn the chat object all in one scene, note you get a null reference as the whole GameObject[] is null which should hold your Chat prefab - i believe the whole thing is null, not just it has no entries but could not attach the debugger to my windows build to confirm. Also note, if you do this in the editor in Unity, it is not null.
If you make a scene 0 that doesn't really do anything but go to scene 1 (where you have the multiplayer scene we used before and the Chat on Keypress), then make a windows build the same thing will actually work. I am not sure if you need the forge manager script in scene 0 and have it not destroy on scene change and this is doing something, or just the fact this is all done (the instantiating) in a scene with index != 0 will work regardless. I do know you don't need to become host in scene 0, before spawning chat in scene 1, you can do both these things in scene 1 and it will still work.
[Optional] Discord Username:
Gwom
The text was updated successfully, but these errors were encountered: