Is there a simply way to reset the glyph names of pua characters to their original names?

For example resetting the pua character F295’s name from “customname” to uF295.

There is around 300 such characters I want to remove custom names for, but removing the characters from the custom name xml file and clicking “Update Glyph Info” doesn’t work.

A small script.

(Resetting the name would yield uniXXXX for four-digit hex codes btw.)

for layer in Glyphs.font.selectedLayers:
    glyph = layer.parent
    if not glyph.unicode:
        continue
    fallbackName = Glyphs.glyphInfoForUnicode(glyph.unicode).name
    if glyph.name != fallbackName:
        glyph.name = fallbackName

Select the glyphs you want to change, run the script.