Can we use NetworkDictionary ?
The whole answer can be found below.
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).
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
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