QUICK DEV TIP #52 UE4 / UE5 - EVENT TO FUNCTION / FUNCTION TO EVENT

Here is a quick tip that my friend told me about the other day that I thought was cool and wanted to share!

Did you know you can quickly change a chunk of blueprint code between being a function and an event?

If you would prefer to watch the video version, check it out here

This is super easy to do. In my example below I have a custom event that I want to migrate into a function. If you right-click on the events name on the very left-hand side of your blueprint, you will get a menu pop-up. At the bottom of that menu, you will see Convert event to function

QDT52_Blog01.JPG
 

Clicking on this automatically turns it into a function of the same name and removes the custom event.

QDT52_Blog02.JPG
 

We can also take it back the other way! So if we right-click on the function name on the left-hand side of our blueprint a similar menu will pop up. However this time we are looking for the option called Convert function to event

QDT52_Blog03.JPG
 

And now its back to being an event. It makes it a little bit messy but hey, you saved time so its worth it.

QDT52_Blog04.JPG
 

There are some limitations to this. For example, functions can’t have time stuff in them, such as Delay nodes. So if you try to convert an event that has a delay in it, it will fail.

QDT52_Blog05.JPG

This system only seems to work in Unreal Engine 4.26 onwards and it is exactly the same process in Unreal Engine 5 Early Access.

I use this whenever possible now as it’s a real nice little time saver!

If you want more quick tips & tricks FOLLOW ME ON TWITTER @cbGameDev

Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/