UE4 Blueprint Literals

by on

I've been working in blueprints for our games, and I decided to make a new array, so I made a new literal array, and it seemed to work.

However, I started getting some issues as I tested more thoroughly. I have not read anything about blueprints or how to program with them as I assumed it should come naturally.

Anyway, I quickly discovered that literal is another word for const and that literals are immutable (not able to change); until you promote them to a local variable.

Which makes a lot of sense, so don't try to change the value of a literal that you add to your blueprints until you promote it. 

In my opinion, there should be an error thrown when you try to do such a thing, but there is no error.

Your values will not change when assigning by reference.

Hopefully, this is helpful to someone else!


Comments 0
No comments have been left yet.