Unreal/CarlaUE4/Plugins/RoadRunnerImporter/Source/RoadRunnerImporter/Private/RoadRunnerImportUtil.cpp
////////////////////////////////////////////////////////////////////////////////
// Mimics how Unreal renames materials. Needed for older exports.
// Chops off chars up to the last ':' and replaces invalid characters with '_'
Mimics how Unreal renames materials. Needed for older exports.
Chops off chars up to the last ':' and replaces invalid characters with '_'
Mimics how Unreal renames materials . Needed for older exports . Chops off chars up to the last ' : ' and replaces invalid characters with ' _ '
FString FRoadRunnerImportUtil::ConvertMaterialName(const FString mtlName)
{
	FString newName = mtlName;
	int namespaceIdx;
	if (newName.FindLastChar(':', namespaceIdx))
	{
		newName = mtlName.RightChop(namespaceIdx);
	}
	return ObjectTools::SanitizeObjectName(newName);
}
FString FRoadRunnerImportUtil :: ConvertMaterialName ( const FString mtlName ) { FString newName = mtlName ; int namespaceIdx ; if ( newName . FindLastChar ( ' ' , namespaceIdx ) ) { newName = mtlName . RightChop ( namespaceIdx ) ; } return ObjectTools :: SanitizeObjectName ( newName ) ; }
Mimics how Unreal renames materials.
Mimics how Unreal renames materials .
// Start after last colon // Replace invalid characters