After migrating to 4.24.2 and seeing that the error didn’t magically went away. So I checked for other possibilities.
Since the error become an issue when I created a new custom class extended from “WorldSettings”, I knew the issue should go away if I deleted the leftover object.
I verified that there is really 2 objects(File/Export All/T3d format), one of the origional class, and one of the new
Begin Actor Class=/Script/AA29.AA2_WorldSettings Name=AA2_WorldSettings Archetype=/Script/AA29.AA2_WorldSettings'/Script/AA29.Default__AA2_WorldSettings'
Begin Actor Class=/Script/Engine.WorldSettings Name=WorldSettings_0 Archetype=/Script/Engine.WorldSettings'/Script/Engine.Default__WorldSettings'
As I mentioned before, I’ve already added a ton of content into the new AA2_WorldSettings class for all the maps, so I could not start over(by copying map map content to the “Empty Map”, World Setting isn’t possible to copy in the GUI as far as I know.
So I created a new “Editor Utility Widget” whos only purpose is, if button is clicked, to delete the actor named “WorldSettings_0”, the name should be the one that was “leftover” when the engine tried to copy over all the attributes to the new class(and failed to delete) Here is the Event graph behind a simple button I added to the widget:
I assume it would be as easy to create a function in C++, but since I’m a bit more “fluent” in BP’s
This is a solution that worked for me. After deleting the leftover “WorldSettings_0” objects from a map I can rebuild without any errors.
I can’t recommend that you use this solution, but that is more that I don’t want to cause you any issues, and leaving the “WorldSettings_0” in the map might be the best way forward. A build error is something you might be able to live with.
But if you try it, make sure that you have full backup of the maps(You will have to run the BP on all maps in the project).
Here is a short video showing the usage of the Widget: