Is there any way to perform custom tasks before packaging?

For example, I want to write some C++ functions to modify certain Actor properties in a level before packaging (or move, delete, etc.), and this won’t affect the level file, only saving and packaging into the game build.

unun derst and able