You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Instead of blindly deleting all existing generated uassets, just make a list of them.
Generate assets and populate a second list containing the (re)generated assets.
Compare the two lists, and only delete any assets that were not (re)generated. In other words, only delete actual stale asset files.
UE will naturally detect modifications to the modified files and open the check out prompt dialog (I have a very rough implementation working locally, may clean up and do a PR later if I can find time)
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: