EasySync
Configuration syncing made easy thanks to CSync by Owen3H.
Last updated | 9 months ago |
Total downloads | 4056 |
Total rating | 2 |
Categories | Libraries |
Dependency string | Dreadrith-EasySync-0.0.2 |
Dependants | 7 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
Overview
EasySync aims to be the easiest way of syncing configuration between host and players (clients) for Lethal Company so that you can focus on creating the meat of your mod. All you'd have to do is to write your config class!
Most config syncing guides (I've seen) require you to copy paste a bunch of code such as the request, receive, patches, etc... So why not reduce the amount of duplicate code and put it in one place? This will handle that for you.
How To Use
I actually wrote a wiki. I didn't like that :(
How does it work?
TLDR: Reflection based code to handle the static members of CSync due to its generic type requirement.
Cursed code that uses reflection to be able to handle CSync's requirement for generic types. Static members are not one and the same in generic types and one exists for each generic type. Using reflection, it grabs the members needed for CSync's functionality and handles them the same way as CSync requires so that there isn't the same code for each different class that inherits from CSync's SyncedInstance class.