Setting FixedString NetworkVariables Multiple Times Causes Null Ref Exception

Hello all! I’m working on a player banner editor for my game which has a few FixedString64Bytes NetworkVaraibles in order to synchronize Color. I declare them like so:
public NetworkVariable bannerBGColor = new();

and set them the exact same way they are set in the unity netcode documentation:
bannerBGColor.Value = ColorUtility.ToHtmlStringRGBA(_color);

This set works fine the first time its called, it gets replicated over the network flawlessly. However upon subsequent set attempts the below error gets thrown and the variable stops being replicated on clients. It doesn’t matter what the string is or when i do the subsequent sets. ANY help would be really appreciated ^-^ I’ve been bashing my head against this for hours.

The Error:

Still haven’t managed to figure out why this is happening, would really appreciate some input!

Update the version of NGO you’re using as this issue was fixed some time back.

Thank you! I didn’t consider updating because this project is really fresh, but the 1.1 version got installed as a dependency of something, updated to 2.2 and things are all good now :slight_smile:

1 Like