Closed HomerJohnston closed 3 years ago
Hey there,
Sorry for the long delay. I'm taking over development of the Unreal plugin at Articy and working my way through our backlog of issues.
I've merged a PR into our development branch (#42) that should solve the issue, though I realize now I haven't tested it for when files actually need to be deleted, only when they weren't supposed to be deleted. I'll tackle that next to make sure it's handling everything properly.
It sounds like your fix was a lot more complex than mine. I basically just forced Unreal to mark all the packages we need as "for edit" after they're regenerated.
When using perforce, CodeGenerator::GenerateAssets() immediately deletes all files in the Generated folder. This causes UE to mark the files for Delete in source control. After the assets are regenerated, their status cannot be altered in source control, they are stuck on being marked for delete. The files must be deleted by source control, or reverted by the user so they can't be updated, there is no way to avoid this. The user must submit the deletion to source control, and then run Regenerate a second time to recreate the assets. Then they will be marked for add and can be re-added. The cycle continues for infinity.
A possible fix is: