Fix warnings
What warnings have you fixed? Most of the changes you've made are clean up (not all of which actually improve readability), but some add things that are unnecessary, and a few others will affect/change behavior of the code—why?
I fixed some warnings that will appear in most IDE's. I made the following changes:
- Replacing for loops with foreach loops.
- Removed all default value initializations.
- Removed unused imports.
- Fixed a potential NullReferenceException.
- Removed unnecessary else statements.
What IDE are you using? I'm using Visual Studio (which is arguably the most commonly used IDE) and don't get any of these warnings...
I'm using Jetbrains Rider
I've integrated most of these changes in my latest clean up commit. For future pull requests, please make sure to build the solution locally before committing so that your changes are applied to the Unity package files as well (this happens automatically via post-build actions). Slightly more descriptive commit messages might be good too, as I initially had no idea what warnings you were referring to.
Also, the for -> foreach change you made in the Server class needed to be applied to the Client class as well. Thanks :)