FishNet icon indicating copy to clipboard operation
FishNet copied to clipboard

Changing SyncVar Value before nob Spawn calling OnChange only with asServer: true on Host

Open SnaiperoG3D opened this issue 1 year ago • 2 comments

General Unity version: 2021.3.30f1 Fish-Networking version: 4.2.2Pro Discord link: https://discord.com/channels/424284635074134018/1034477094731784302/1236053687047163916

Description On v4 fish version, changing SyncVar Value before nob spawn cause onChange call only once with asServer: true on Host.

Replication Define any SyncVar in NB with onChange method realized with simple debug log. Instantiate nob -> change SyncVar -> spawn nob -> onChange will be called only once with asServer: true on Host. Instantiate nob -> spawn nob -> change SyncVar -> onChange will be called twice, with asServer: true and asServer: false on Host as it should.

Expected behavior 2 onChange calls, with asServer: true and asServer: false

Idk if this was done on purpose or not, but there is no such problem on fish v3.

SnaiperoG3D avatar May 03 '24 21:05 SnaiperoG3D

Posting a discord link with the same report is not considered 'troubleshooting' the issue. This does sound like it could be a bug but without seeing replication steps, such as where you are changing the value, nothing can be done.

FirstGearGames avatar May 04 '24 19:05 FirstGearGames

i sent scripts to discrod dm to reproduce the problem there are test scripts to reproduce this issue this script need to be placed in the scene go: https://pastebin.com/RJ3myge9 and this script on prefab, which will be spawned by previous one: https://pastebin.com/FGTUWqzt

SnaiperoG3D avatar May 11 '24 18:05 SnaiperoG3D

fish_syncvar_bug.zip

ty! Will check into this asap.

FirstGearGames avatar May 26 '24 14:05 FirstGearGames

Resolved in 4.3.4

FirstGearGames avatar Jun 02 '24 01:06 FirstGearGames