diff --git a/NebulaWorld/Chat/EmojiDataManager.cs b/NebulaWorld/Chat/EmojiDataManager.cs index 7e5b998c8..c111076d5 100644 --- a/NebulaWorld/Chat/EmojiDataManager.cs +++ b/NebulaWorld/Chat/EmojiDataManager.cs @@ -33,6 +33,7 @@ public Emoji(Dictionary dict) public static class EmojiDataManager { public static Dictionary> emojies = new Dictionary>(); + private static bool isLoaded = false; private static void Add(Emoji emoji) { @@ -49,6 +50,8 @@ private static void Add(Emoji emoji) public static void ParseData(TextAsset asset) { + if (isLoaded) return; + string json = "{\"frames\":" + asset.text + "}"; if (MiniJson.Deserialize(json) is Dictionary jObject) @@ -74,6 +77,8 @@ public static void ParseData(TextAsset asset) { kv.Value.Sort((emoji1, emoji2) => emoji1.SortOrder.CompareTo(emoji2.SortOrder)); } + + isLoaded = true; } } } \ No newline at end of file