QUICK DEV TIP #55 UE4 / UE5 - MOVE VARIABLE TO PARENT

Here’s a new tip that can save you a bunch of time when working with parent/children variables!

Did you know you can easily move a variable from a child blueprint up into the parent in just a few clicks?

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

This works in 4.26 onwards as it was only recently implemented. Sometimes we find that we have been making functionality in a child blueprint, but have now got to the point where it would be useful to share some of this functionality or at least variables with other blueprints to avoid unnecessary duplication. When this happens, often you need to move variables up into the parent blueprint so all the children can share it.

We can do this really easily with todays Quick Dev Tip. In your child blueprint if you Right-Click on a variable in the list on the left, you will see an option called Move To Parent Class.

 

Clicking on this will remove the variable from the child and move it up into the parent without breaking any links or references!

 

You will still be able to access the variable in the child by Right-Clicking and searching for its name, but it will no longer appear in the variable list directly

 

This seems to work in exactly the same way in the Early Access Version of Unreal 5. The only differences being in the general UI overhaul.

This is a great thing to know about because otherwise without this you need to go to the parent, create a new variable (without a conflicting name). Then return to your child blueprint, reassign all the uses of the old variable with this new parents variable. Then clean out/delete the child’s variable when you are complete. So you can see how this can save you time!

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/