# Event on "cook/packaging" (Extending editor)

**URL:** <https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679>\
**Category:** Pipeline & Plugins\
**Tags:** Cooking, unreal-engine, Packaging, editor, CPP, question\
**Created:** [August 13, 2020, 11:05am UTC](https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679 "2020-08-13T11:05:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![undercover](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@undercover](https://forums.unrealengine.com/u/undercover)\
**Post date:** [August 13, 2020, 11:05am UTC](https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679/1 "2020-08-13T11:05:21Z")

</div>

Hi!

We have written several custom commands (executed through editor GUI) that we use for automation in UE. The problem we have now is that we want to automatically run those commands when the game is packaged. At the moment developers have to go through each level and run those commands through the GUI to make sure the game is packaged correctly. Is there any way to hook up our commands on some “cook/package” event, so when a level is about to be cooked, our commands are first executed on that level and its actors? What is the recommended way to go about this? Or do you have to use commandlets? We rather not build the game from the console if possible.

Any thoughts or ideas?

---

<div class="post-metadata">

**Author:** ![Kirsten](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kirsten](https://forums.unrealengine.com/u/Kirsten)\
**Post date:** [July 11, 2022, 10:17am UTC](https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679/2 "2022-07-11T10:17:04Z")

</div>

Hej @undercover - did you ever figure out a way to achieve what you are asking for?

---

<div class="post-metadata">

**Author:** ![rickyviking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rickyviking](https://forums.unrealengine.com/u/rickyviking)\
**Post date:** [August 26, 2024, 12:51pm UTC](https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679/3 "2024-08-26T12:51:27Z")

</div>

Hi @undercover, @Kirsten -same question here, did any of you find a solution?

---

<div class="post-metadata">

**Author:** ![undercover](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@undercover](https://forums.unrealengine.com/u/undercover)\
**Post date:** [January 22, 2025, 2:14pm UTC](https://forums.unrealengine.com/t/event-on-cook-packaging-extending-editor/469679/4 "2025-01-22T14:14:35Z")

</div>

Hey, sorry for being inactive for a while. In the end, we resorted to running a console command to build the game. Unfortunately, we found it too time-consuming at the time to figure out how to integrate it neatly into the engine. Using the console command was simply the easiest solution that worked for us.
