The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Can we use NetworkDictionary ?

Bremstork
2023-01-16 06:48:26

Hello ! 🤗

I was trying to use a NetworkDictionary in a project but it doesn't seem to be working and the api references doesn't seem to be up to date.

Here is how I declared my dictionary :

And my NetworkBehaviour works fine with other networking stuff 👨‍💻

When I use the "set" method on the server, which is said to add a new key when the one in input is not registered, it doesn't add the new association to the dictionary :

Even the method "add" doesn't add it to the dictionary :

Furthermore, when I want to change specific value using brackets like suggested in the API references here :

I cannot do it because it doesn't give access to the "set" property :

(It says that it is impossible to modify the return value because it is not a variable)

Any thought/help on this ? 😋

Comments

Bremstork
2023-01-16 07:08:47

Ok, after further investigations, i found out it is certainly due to using struct instead of a variable like said in the tooltip 🤡

Back to top