Cannot find NetworkDictionary in latest.

Hi,
I've been unable to find NetworkDictionary in the library though it is in the documentation, nore can I find a working example. I've read a ton of issues on the forums as well. Do Networked Dictionaries and Lists work? I'd love to use them and have been completely unsuccesful writing my own Network variable types as I can't find a good example anywhere.

Thanks for any help!

Apparently they were removed but not from the documentation.

The documentation is unfortunately not up to date and lots of information is missing.

NetworkDictionary has been removed. NetworkLists still exist. You can write your own NetworkVariables by inheriting from the NetworkVariableBase class but I agree the process is not well documented (well not at all) and a bit complicated. I'm happy to help out with any specific issues.

2 Likes

Thanks for responding Luke.

I’m holding off modifying network variable until its a bit more solidified but did create a dictionary that is a wrapper around the classes (essentially two lists) and ill share with the community once its tested.

Id love to see unity make dictionaries and custom serialization less of a pain point in future releases. A lot of code needs to be written to send simple structures and you cannot currently serialize arrays into network variables.

4 Likes

First thing i wanna use a networkvariable for is a dictionary with clientId and SteamId, just to find out they removed Network Dictionaries...

Also curious if there are examples of NetworkDictionary out there now! Is it just too hard to make a well-working one?