diff --git a/Editor/RewiredGlyphManagerEditor.cs b/Editor/RewiredGlyphManagerEditor.cs index 3b74799..b510814 100644 --- a/Editor/RewiredGlyphManagerEditor.cs +++ b/Editor/RewiredGlyphManagerEditor.cs @@ -31,10 +31,9 @@ public override void OnInspectorGUI() collection.NullGlyph, collection.UnboundGlyph }; - foreach (GlyphCollection.GuidEntry hardwareEntry in collection.GuidMaps) + foreach (GlyphCollection.GuidEntry guidEntry in collection.GuidMaps) { - EditorUtility.SetDirty(hardwareEntry.glyphMap); - foreach (Glyph glyph in hardwareEntry.glyphMap.Glyphs) + foreach (Glyph glyph in guidEntry.glyphMap.Glyphs) { glyphs.Add(glyph); } @@ -42,7 +41,6 @@ public override void OnInspectorGUI() foreach (GlyphCollection.HardwareEntry hardwareEntry in collection.HardwareMaps) { - EditorUtility.SetDirty(hardwareEntry.glyphMap); foreach (Glyph glyph in hardwareEntry.glyphMap.Glyphs) { glyphs.Add(glyph); @@ -51,7 +49,6 @@ public override void OnInspectorGUI() foreach (GlyphCollection.TemplateEntry templateEntry in collection.TemplateMaps) { - EditorUtility.SetDirty(templateEntry.glyphMap); foreach (Glyph glyph in templateEntry.glyphMap.Glyphs) { glyphs.Add(glyph); @@ -95,6 +92,22 @@ public override void OnInspectorGUI() glyph.TextMeshSpriteSheetName = spriteSheetOutput.spriteAssetName; } } + + // Set assets as dirty + foreach (GlyphCollection.GuidEntry guidEntry in collection.GuidMaps) + { + EditorUtility.SetDirty(guidEntry.glyphMap); + } + + foreach (GlyphCollection.HardwareEntry hardwareEntry in collection.HardwareMaps) + { + EditorUtility.SetDirty(hardwareEntry.glyphMap); + } + + foreach (GlyphCollection.TemplateEntry templateEntry in collection.TemplateMaps) + { + EditorUtility.SetDirty(templateEntry.glyphMap); + } } }