Search Issue Tracker

Active

Under Consideration for 1.2.X

Votes

0

Found in [Package]

1.2.1

Issue ID

N4EBUG-113

Regression

No

Entities netcode predicted spawn component values are incorrectly reverted by GhostUpdateSystem

Package: Unity Netcode

-

Steps to reproduce:
1. Download and open the project from the attached Google Drive link
2. Set the preloader (Tools -> Scene Autoload -> Add Default Preloader)
3. Disable network emulation (Multiplayer -> Window: PlayMode Tools -> Network Emulation (checkbox))
4. Open the Mission Launcher editor window (Game -> Mission Launcher)
5. Select "GameMode_Gym" and hit Play on the same Mission Launcher Window
6. Press the big button in the bottom-right to attack (spawn a ghost ability)
7. Observe that the character has an animation glitch when the ability starts - this is because the GhostUpdateSystem has reset the unit's active ability ghost field, which is then reenabled a few frames later, causing the anim to trigger again

Expected Result: Predicted spawn component values are not reverted by GhostUpdateSystem
Actual Result: Predicted spawn component values are incorrectly reverted by GhostUpdateSystem

Reproducible with: Netcode for Entities 1.2.1 (2022.3.30f1, 6000.0.3f1)

Testing Environment: Windows 11
Not reproducible on: No other environment tested

Notes:
-When simulating latency, the visual glitch is far more prominent
-Forum thread: https://forum.unity.com/threads/predicted-spawn-component-value-is-sometimes-wrongly-reset-in-ghostupdatesystem.1593258/
-Also, the glitch is observed from the console. An expected behaviour is as follows:
[server, 106190] ProcessAbilityEventsSystem: Entity.Null -> Entity(859:45)
[Update, 106194] DynamicComponentTypeHandle[Game.Data.Abilities.LinkedAbilityEventData]: True
[Presentation, 106198] Entity(866:5): Entity.Null -> Entity(861:29)
[Presentation, 106237] Entity(866:5): Entity(861:29) -> Entity.Null

An unexpeced behaviour is as follows:
[client, 97943] ProcessAbilityEventsSystem: Entity.Null -> Entity(859:41)
[Presentation, 97945] Entity(866:5): Entity.Null -> Entity(859:41)
[Presentation, 97949] Entity(866:5): Entity(859:41) -> Entity.Null
[server, 97949] ProcessAbilityEventsSystem: Entity.Null -> Entity(861:27)
[Presentation, 97957] Entity(866:5): Entity.Null -> Entity(859:41)
[Presentation, 97996] Entity(866:5): Entity(859:41) -> Entity.Null

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.