public static class FontExtension { // Call it when the type of the string assigned to the global Text component is minimal. // XXX : If font is in AssetBundle, it may not work correctly. public static void RefreshDynamicTexture(this Font font) { if (font == null || font.dynamic == false) return; Resources.UnloadAsset(font); } }