Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.2.0b10
Issue ID
947322
Regression
No
[Multiplayer] connectionToClient variable is not set on Spawned objects
connectionToClient variable is set only on Player object. So when you try to use this variable (for example for SpawnWithClientAuthority() or RemoveClientAuthority()) then you get NullRefException
How we can reproduce it using the example you attached
1 Open attached project
2 Open scene "Scene1"
3 Press Play in Editor
4 Press "Lan Host" in Game view
5 Press key "s" on the keyboard and then key "e"
Actual results: NullReferenceException appears -
"NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Networking.NetworkServer.SpawnWithClientAuthority"
it happens because the connectionToClient variable is not set
Expected results: connectionToClient variable should be set for Spawned objects
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- IndexOutOfRangeException is thrown when right-clicking on Additional Shader Channels property in Canvas Inspector
- [Vive][SteamVR] Play Mode stops or the Editor closes once XR processes (SteamVR) are shutdown during Play Mode
- [Linux][Vulkan] Silent crash when the Player window is resized
- Blend Tree Slider does not adapt if outside allowed range on change of Threshold values
- Mesh Rendered GameObject using the SpriteLitDefault Material becomes invisible when animating with the URP Sprite-Lit-Default Shader
Resolution Note:
Mass closure of UNET Bugs.
As UNet is Deprecated we are moving to low maintenance mode, where critical issues can get fixes.
Closing this bug as part of cleaning-up the Bug List.
If you feel this bug is really a road-blocker, you can reopen the bug and we will work this one.