Hello, I’m trying to use the Context ViewModel CreationType on a child Widget Blueprint (WBP). But it never works the way I’d expect.
In short, when I try to use this type in a child WBP, the ViewModel doesn’t get set properly and I’m getting the following error :
Error Model View Viewmodel The new viewmodel MyViewModel cannot be evaluated again. WBP_ImpactedChildWBP
The use case is the following :
- I have a WBP (let’s name it “WBP_Score”), reusable in multiple contexts.
- This WBP expects a “ScoreViewModel” : I’m setting its creation type to
Context
- This WBP expects a “ScoreViewModel” : I’m setting its creation type to
- I put it as a child of another WBP (e.g. “WBP_PlayerCard”)
- This WBP has a valid “ScoreViewModel”, set properly thanks to some
Resolver
- This WBP has a valid “ScoreViewModel”, set properly thanks to some
My guess is that the ViewModel on the parent WBP is set too late, and the Context CreationType on the child WBP doesn’t support re-evaluating the ViewModel afterwards.
Is this a known bug? Has any anyone managed to use this option properly ?