Unity Network (Player)
Hey I have a question if I "link up" 2 Scripts about public static in a player, can affect also other players?
For example: I go, (public static bool walk = true) -> Do all Players go on the server? Although only I press "w"?
->Of course I havn't used exactly this, but in a sort ...One time there wasn't any other possibility
Answer by meat5000 · Apr 01, 2018 at 06:15 PM
static is generally avoided. You should not use static for things with more than one instance, like player characters or enemies etc. There was always GetComponent for script linking and Instancing (pseudo-singleton, pseudleton?) for making sure there was only one.
Your answer
Follow this Question
Related Questions
Clash of clans networking. 1 Answer
Unity Networking 1 Answer
uNet Network Sync Problem With Non-Player Object 0 Answers
how to spawn a player prefab on a server 0 Answers
syncvar not changing after command 0 Answers