I’m fairly new to assembly definitions (and relatively new to C# too), but it seems like such a waste to have so many scripts all sharing the same definition and bloating compile times when they often times just need the smallest bit of succinct data from various scripts.
In my project I have various combat related scripts like movement, attacks, stats, etc that all are interwoven in complex ways, but I have MANY other scripts that only need to reference a single float or bool sometimes that I’d love to be able to remove from the mounting compile times.
These compile times are such a drag that I even considered using PlayerPreferences(), as to my knowledge that would allow me to send messages to entities in a way that they don’t have to always be combined in the same assembly definition.
So as a simple example lets say you have a GUI with a health bar. You could set an int in PlayerPrefs, have that set to the players health each frame and load it from the GUI script with PlayerPrefs.GetInt( “PlayerHealth”). Not performant at runtime but I hope this kinda communicates what I’m getting at.
Are there any means of sending information that’s the best of both worlds? Performant and doesn’t bloat compile times by requiring these scripts from all sharing the same assembly definition?
I’m pretty new to this so this might be a really dumb question. Thanks in advance for any insights even if to say it’s not a good idea to chase this concept.