I come from a strong C++ background and work with other game engines, I just picked up Unity a couple days ago and run into the problem of separating out classes correctly.
Specifically, I have a separate class for GUI work, that when it detects a button press for example, I need my ‘main’ program to detect it to do other work. What is the best way to do this? Since C# doesn’t really seem to use pointers, I’m not sure how to best pass info between classes.
This is, of course, no problem when the classes do not need to be set on a game object (do not need MonoBehaviour functionality), but when 2 or more MonoBehaviour derived classes need to talk, how does one do this efficiently?
Thank you.