If you add an animation to a widget that has the same name as an inherited function, then try to override that function the editor silently crashes.
This sounds like a “well duh” thing but it became confusing when I had a custom parent widget with my own functions I was overriding and didn’t notice the name collision. Would have been very helpful to have a proper error/warning.
- In a new BP project, Create a widget BP
- Add an animation called “OnPaint”
- On the graph for the widget, override the OnPaint function.
- The editor will crash at this point.
I see two possible ways to deal with this:
When overriding a function it should
check to see if you have a local
variable (including animations) that
is named the same as the function you
are overriding and give you an error
message like “A local variable
already exists with the name [Name of
variable]. You will need to rename
this variable to override this
Another option would be when setting the name for an animation check the parent classes functions for name collisions during the validation step. The validation error could be “This name is in use by a parent function”.
UE 4.12.5 Windows 10