Unity: Trying to figure out how to organize my data for ViewModels
Posted: 21 Jul 2019, 17:57
I have done WPF programming for a long time, but I'm new to Unity. I'm really excited about trying out Noesis, but I'm having a conceptual problem that I'm sure has a simple answer.
My application is going to be receiving a lot of data over WebSockets. I've got a WebSocket class defined as a MonoBehavior and it is working. However once data comes in, I need to push updates to my ViewModels, both data and other things (like starting animations).
What is the best way to organize things in my project to do this? Is there a way for my WebSocket class to get access to the ViewModels? Do I need some sort of DataManager that can see all of the ViewModels and update them when a DataUpdated() event fires?
Any/all suggestions welcome. Thanks!
My application is going to be receiving a lot of data over WebSockets. I've got a WebSocket class defined as a MonoBehavior and it is working. However once data comes in, I need to push updates to my ViewModels, both data and other things (like starting animations).
What is the best way to organize things in my project to do this? Is there a way for my WebSocket class to get access to the ViewModels? Do I need some sort of DataManager that can see all of the ViewModels and update them when a DataUpdated() event fires?
Any/all suggestions welcome. Thanks!