Skip to content

Instantly share code, notes, and snippets.

@zr0n
Last active June 4, 2025 23:46
Show Gist options
  • Save zr0n/97cd1526c5cd7861d93b2060450d2763 to your computer and use it in GitHub Desktop.
Save zr0n/97cd1526c5cd7861d93b2060450d2763 to your computer and use it in GitHub Desktop.
/* Include lines below after
if (o_sharedPtr)
{
*o_sharedPtr = player_sharedPtr;
}
in method CalculateUMediaPlayerFullNameFromIMediaPlayer
*/
// Remove unnecessary information from name (remove level name)
// EX: /CXProEnvironmentDefault/Main/Maps/L_Immersive_+_Jumbotrons_LevelInstance_2.L_Immersive_+_Jumbotrons:PersistentLevel.VideoImmersive0_CosmTiledMediaMeshActor Up
// becomes VideoImmersive0_CosmTiledMediaMeshActor Up
static const FRegexPattern Pattern(TEXT("^.*[.:]PersistentLevel\\.(.*)$"));
FRegexMatcher Matcher(Pattern, *o_humanReadableName);
if (Matcher.FindNext())
{
// Remove Level name
*o_humanReadableName = Matcher.GetCaptureGroup(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment