push-pop / Unity-MVVM

Lightweight MVVM Framework for Unity3D
MIT License
323 stars 27 forks source link

ViewModelProvider should be able to provide non-singleton instances of ViewModels #82

Open push-pop opened 3 years ago

push-pop commented 3 years ago

This can be done with an optional parameter in GetViewModelInstance(string GUID = null) or GetViewModelInstance(GameObject g = null)

ViewModelProvider can maintain a dict of viewmodels and return the appropriate one. This will be a game changer for things like collection bindings but also useful for multiple instances of the same view,