Undo widget rename corrupts Viewmodel code gen

Sometimes the code gen for bound viewmodels gets corrupted.

This happens rather frequently to our development team, and it took us a while to narrow down the repro to this undo/redo case. Some folks on the team believe that there may be other causes as well, but this is the one we’ve managed to nail down.

We’ve found that reloading the asset will often fix this issue, but in some cases it seems we still have to entirely close and reopen Unreal editor to get past this. Would love to get a fix for this issue as it definitely has been a pain point for the team.

Thanks!

Steps to Reproduce

  • Create a new widget blueprint
  • Create a new viewmodel blueprint
  • Bind the VM to the widget
  • In the widget, create any widget child (e.g. an Image)
  • Compile
  • Observe everything is fine
  • Rename the image widget
  • Undo
  • Compile
  • Observe compilation error: The setter name ‘SetYourVM’ already exists and could not be autogenerated

Hello [mention removed]​

Thank you for reaching out and bringing this issue to our attention.

I was able to reproduce the behavior described by following your instructions.

I’ll investigate a bit more and possibly open a ticket for this.

I’ll let you know.

All the best,

[mention removed]​

Hi,

This should be fixed as of CL#33102960, could you give that a shot and let us know if it’s still breaking on undo/redo? Thanks!