- Home /
Using SyncVar on a generic List?
I'm making a game where the user has multiple spells, cooldowns etc. To store all these values I use generic lists. The problem however is, when for example I want to check if a cooldown exceeds server side, I can't use a [SyncVar]
for lists so I'm forced to make a bunch of [SyncVar]
variables.
Is there a workaround on how to do this? Because now all lists run client side which is not safe.
This is the error I get: Failure generating network code. UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
Your answer
![](https://koobas.hobune.stream/wayback/20220612001827im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Inheritance and uninitialized synclists 2 Answers
A node in a childnode? 1 Answer
Photon Unity Networking (Viking Demo) Error: Argument is out of range. 1 Answer
Syncing Animations on Child Objects in UNET 1 Answer
Question about RPCs 1 Answer