-
-
Notifications
You must be signed in to change notification settings - Fork 307
Windows Stand Alone Player returns null reference when you instantiate in Scene 0 #370
Description
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