EliotVU / Unreal-Library

UnrealScript decompiler library for Unreal package files (.upk, .u, .uasset; etc), with support for Unreal Engine 1, 2, and 3
MIT License
367 stars 86 forks source link

Decompile properties of type "Name" with quotes #58

Closed EliotVU closed 1 year ago

EliotVU commented 1 year ago

The UnrealScript compiler standard way of assigning a string of the type "Name" to a name property is done by just passing the identifier (without spaces) like so SomeNameProperty=MyNameWithNoSpacesEtc, in general a "Name" type is a special unique string that gets stored only once in memory and is case-insensitive, normally the engine forbids special characters and white space characters.

But despite that, sometimes white space characters or even special characters are present anyway, which may cause issues if the user wants to re-compile the code.

Solution: Always wrap "Name" types using double quotes.

For some reason you cannot wrap names with single quotes in the defaultproperties block, despite this being the only way to write them in an UnrealScript context!