Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Is there a way to reset FNames (wrong capitalization, etc.) ?

One thing that was super annoying in UE3 was a side effect of the fact that all strings used in the editor were stored as FNames, which are case insensitive and that there was no way (at least that I know of) to reset them.

So if you typed MyVAriable instead of MyVariable once and saved, that capitalization would be in your project forever. This was even more annoying when two capitalizations can have a valid meaning (I'm looking at you, Block and bLock).

FNames are still used in UE4, and their behaviour seems to be exactly the same. Is there a way to reset one specific FName if you happened to save your project before noticing your typo ? Any kind of tool, even a simple command line, to do that would be great.

This kind of things just drive me crazy (and I'm sure I'm not the only one) and I usually end up renaming the offending variable to something slightly different to preserve my sanity but this is a far from ideal solution...

Thanks in advance.

Product Version: Not Selected
more ▼

asked Jun 20 '14 at 07:33 AM in C++ Programming

avatar image

David Steinberg
26 1 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Sep 23 '14 at 11:18 AM

avatar image

Jamie Dale STAFF
7.5k 177 67 305

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Press F2

Highlight your variable

Press F2

and you can rename it to fix capitalization

Does that work?

I've seen cases where it doesn't but by majority I can fix any typo using F2

I am not trying to sound silly here, just reflecting on my own experience, and therefore clarifying the matter for others if your case is something else


more ▼

answered Jun 20 '14 at 08:31 PM

avatar image

10.6k 446 346 1088

avatar image David Steinberg Jun 23 '14 at 01:36 AM

Well, pressing F2 only works until the FName is registered, which happens when you save your asset I think. That's why it works most times : because the FName is not saved in the FName table yet.

But once you've saved your asset, the FName is registered and the incorrect capitalization is saved, apparently forever. Hence my question : is there a way to alter/remove a registered FName ?

I know that the doc says that "They are immutable, and cannot be manipulated" but there are a few instances in the code where FNames are modified to resolve case conflicts (cf FNAME_Replace_Not_Safe_For_Threading), having a command line that allows the recapitalization of an FName (at your own risk, obviously) would be pretty nice...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question