Search Issue Tracker
Fixed in 1.0.2
Votes
0
Found in [Package]
Issue ID
1066429
Regression
No
NetworkBehaviour generated PreStartClient does not call base.PreStartClient
NetworkBehaviour generated PreStartClient does not call base.PreStartClient
I have a base class with a "[SyncVar] GameObject x;" and a subclass with a "[SyncVar] GameObject y;"
The client will fill in "y" but not "x".
This is caused by UNetWeaver not generating a call to "base.PreStartClient()" when it generates the subclass's "PreStartClient".
To reproduce:
1. Download project attached.
2. Build and Run a Player and select host or server mode.
3. Run in the editor and select client mode.
Actual result: You should see an error logged for SubclassCube but not BaseClassCube.
Expected result: PreStartClient shall be called on subclass also.
The broken code is in Unity.UNetWeaver.NetworkBehaviourProcessor.GeneratePreStartClient
specifically https://github.com/Unity-Technologies/UnityCsReference/blob/master/Extensions/Networking/Weaver/UNetBehaviourProcessor.cs#L812
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
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- Error "InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings." is present when using UI Toolkit and New Input System
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
- [Linux] The mouse wheel input is inverted when scrolling in the Build
Resolution Note (fix version 1.0.2):
Fixed in HLAPI package v1.0.2