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
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
- Files in the target folder are deleted without a proper warning when building an iOS project
- Character animation freezes when toggling animator on/off in a coroutine
- Certain textures are incorrectly marked in the render pass list when observed through Render Graph Viewer
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.