This seems like a a great library, and I might be severely missing the point, but I don't see a way out of the box to support binding to ViewModels that have their data populated after Awake (since initializiation for binders seems to happen on Awake).
e.g.
- when the ViewModel is created at runtime, and then initialized (since Unity doesn't allow initializing a GameObject before Awake except if it's disabled, and that's an ugly flow for prefabs)
- or even, using IViewModelProvider to have POCO VMs, as you suggested in previous issue replies: how can GetViewModel return a valid non-MonoBehaviour instance that's somehow injected into the MonoBehaviour (ony way I see is you'd have to call some static singleton-ish provider class from within the method for it to happen before Awake, and I'd like to be able to stick with a DI flow)
Adding [DefaultExecutionOrder(100)] to AbstractMemeberBinding fixes it for VMs already in the scene at lauch, but it doesn't work for those created at runtime.
Any insights welcome! Thanks!
This seems like a a great library, and I might be severely missing the point, but I don't see a way out of the box to support binding to ViewModels that have their data populated after Awake (since initializiation for binders seems to happen on Awake).
e.g.
Adding [DefaultExecutionOrder(100)] to AbstractMemeberBinding fixes it for VMs already in the scene at lauch, but it doesn't work for those created at runtime.
Any insights welcome! Thanks!