Description

Edit MattK: The display name is different when running PIE through the editor. This sort of inconsistency seems wrong. We should probably not ever be using the display name.

Spaces are removed from Actor Display Names in packaged projects but not in PIE.

Reproduced in 4.7.5 binary and Main (//depot/UE4/Promotable-CL-2505032)

User provided test project available here:
https://answers.unrealengine.com/storage/temp/37971-substringtest.zip

Steps to Reproduce

Plan (from conversations w. MattK):

UKismetSystemLibrary::GetDisplayName should always return the Actor FName, and ideally be changed to GetActorName.
GetActorLabel does not change.

1. Open any project
2. Create a new Actor Blueprint
3. Drop the BP in the level
4. On Begin Play, Get All Actors of Class (Player Start)
5. Get at Index 0 > Get Display Name > Length > Print String (see attached image)
6. PIE, note that the Length is 13 (Player Start#) which includes the space
7. Package for Windows 64
8. Play

Result:
12 is printed, which is PlayerStart#, the space having been removed.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.7.54.8
Target Fix4.9
Fix Commit2518476
CreatedApr 9, 2015
ResolvedApr 21, 2015
UpdatedApr 27, 2018
View Jira Issue