Fix some issues with blueprint exporter
This commit is contained in:
@@ -317,16 +317,19 @@ FString FlxBlueprintExporter::SanitizeName(const FString& Title)
|
||||
bool PrevWasUnderscore = true; // suppress leading underscore
|
||||
for (TCHAR Ch : Title)
|
||||
{
|
||||
if (FChar::IsAlnum(Ch))
|
||||
if (FChar::IsWhitespace(Ch))
|
||||
{
|
||||
if (!PrevWasUnderscore)
|
||||
{
|
||||
Result += TEXT('_');
|
||||
PrevWasUnderscore = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Result += Ch;
|
||||
PrevWasUnderscore = false;
|
||||
}
|
||||
else if (!PrevWasUnderscore)
|
||||
{
|
||||
Result += TEXT('_');
|
||||
PrevWasUnderscore = true;
|
||||
}
|
||||
}
|
||||
// Trim trailing underscore
|
||||
if (Result.Len() > 0 && Result[Result.Len() - 1] == TEXT('_'))
|
||||
|
||||
Reference in New Issue
Block a user