Why can't I change the case of my variable names?

I can’t change the case of my variable name in Blueprints after the first edit.
For example:
I make a variable called: bSTartHUDCheck
I notice that T is uppercase and try to change it to lowercase. But it just reverts back to uppercase after the edit.
I have to completely exit the editor and re-load the project in order to fix the typo.
Is this known? or maybe an artifact of working with VISTA instead of 7?

This is a side effect of FNames being case insensitive - an unfortunate circumstance that dates back to the early years of Unreal Engine. The misspelled name is stored in the name table, so if you try to correct it, it will just find that existing entry and think “hey, nothing changed”.

It doesn’t have anything to do with Vista or Win7. Someone from the Blueprint team can probably suggest a better workaround for you.

Given gmpreussner’s comment, it seems the best way to get your variable name to change would be to change it twice.

Delete the T, then add it back in as t.

You have to change it to something else. Restart the editor, then change it to what you want.

Sounds so simple :wink: But it doesn’t work, removing it and compiling, then adding a different case of the letter just shoves the letter back as what it was in the first place.

How about deleting the variable, compiling, and then creating a new one with the correct name?

Hi Erdrik,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Deleting the variable/function in question and restarting the editor seems to work in 4.2.1. Saving files on exit doesn’t seem to matter.

We’ve made a change for 4.5 which will make FName case-preserving for the editor and UHT. This should address the FName case issues you’ve been seeing.

I’ve checked that you’re able to rename asset, actor, and blueprint components in a way that changes only their case. I’ve also tested that you’re able to have a variables in different UObject/UStruct types that vary only by case, and that the UHT will generate code that actually compiles.

It is fixed for 4.5. See my answer.

It is somewhat annoying, especially when you’re typing fast and make a couple of mistakes.

I created a custom event called ‘PRocessMouseInput’.
I didn’t want the capital R so I deleted the custom event, saved all, closed editor, reopened editor, created a new custom event called ‘ProcessMouseInput’ …but it still changes back to ‘PRocessMouseInput’. Grrr.

I really hope it gets fixed in 4.5.

Fantastic!