Search Issue Tracker
Fixed in 5.4.4
UNET isLocalPlayer is always false in OnDestroy
When client closes connection, its isLocalPlayer parameter in OnDestroy method is reset to false.
1. Open attached project ("UnetIsLocalPlayer.zip")
2. Open "scene" scene
3. Hit play
4. Click LAN Host button
5. Click Stop (X) button
"NetworkBehaviour.isLocalPlayer" parameter of local player equals TRUE in OnDestroy method
"NetworkBehaviour.isLocalPlayer" parameter of local player equals FALSE in OnDestroy method (visible in Console output)
Reproduced on: 5.4.1p1, 5.4.3f1, 5.4.3p1, 5.5.0f1, 5.6.0a3
Not reproduced: 5.2.5f1, 5.3.0f4, 5.4.1f1
Regression introduced: 5.4.1p1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- FBX Importer broken Animation Tab and errors
- [Android]Terrain tiles not rendered correctly on Android devices with Andreno 540 or lower when Terrain.drawInstanced is enabled
- [Licensing] Editor cannot talk to client if username has unicode characters
- MissingMethodException: Method not found: 'UnityEngine.UnityAPICompatibilityVersionAttribute..ctor
- [URP] Cannot assign overlay cameras to a camera stack while in Prefab Mode.