QUICK DEV TIP #87 UE4 / UE5 - HIDE UI BINDINGS

Here is something that could help keep your project optimised!

Did you know you could turn off being able to bind in widgets?

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

Some people like binding but in general it’s good practice to avoid using it and instead use events to trigger value changes. Binding is effectively setting a value on tick so is not very optimised.

Below you can see 3 examples of values you could bind to in a text element: Text value, color and opacity value as well as shadow color value.

 

You could tell people to avoid using binding or you COULD TURN BINDINGS OFF for your whole project to make sure people don’t use them. To do this we need to head to our Project Settings.

 

Then on the left hand side we want to look under EDITOR, for the Widget Designer(Team) category.

 

We are looking for an option near the top called Property Binding Rule

 

If we use the drop down we will see the options we have to play with. Using any option other than Allow will remove the bindings. Then it is down to you if you want to also have a blueprint warning or a blueprint error. This could be useful to help find out if you have any functionality that is relying on binding that you need to move to an event.

 

If we switch to the Prevent and Error setting and return to our widget example, at first it will look like nothing has happened and it hasn’t. We will need to either recompile the blueprint or restart our project for it to take effect as you can see below when I recompile.

 

This works exactly the same in Unreal Engine 5 as well, the only difference being the UI looks slightly different, but every thing is in the exact same location.

This could be a great thing to do at the start of a project to try and keep your game optimised from the get-go.


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/