From 1285caf31578d758c2b52b915eedb17cc12a1826 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 9 Aug 2023 12:48:21 -0700 Subject: Fix issue where white boxes appear on custom chatbox GUI was not correctly managing .meta files, causing two textures to use the same GUID. Unity would notice and regenerate GUIDs, breaking the custom chatbox material's texture references. --- GUI/GUI/GUI/PythonWrapper.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'GUI') diff --git a/GUI/GUI/GUI/PythonWrapper.cpp b/GUI/GUI/GUI/PythonWrapper.cpp index 167fe36..22e9d65 100644 --- a/GUI/GUI/GUI/PythonWrapper.cpp +++ b/GUI/GUI/GUI/PythonWrapper.cpp @@ -688,6 +688,12 @@ bool PythonWrapper::GenerateAnimator( Log(out, "Error removing unicode texture: {} ({})\n", err.message(), err.value()); return false; } + std::filesystem::remove(tastt_fonts_path / ("Bitmaps/font-" + std::to_string(i) + ".png.meta"), err); + if (err.value()) { + Log(out, "failed!\n"); + Log(out, "Error removing unicode texture: {} ({})\n", err.message(), err.value()); + return false; + } } std::filesystem::remove(tastt_fonts_path / "Bitmaps/emotes.png", err); if (err.value()) { @@ -698,6 +704,21 @@ bool PythonWrapper::GenerateAnimator( Log(out, "success!\n"); } + else { + std::error_code err; + std::filesystem::remove(tastt_fonts_path / ("Bitmaps/font-ascii.png"), err); + if (err.value()) { + Log(out, "failed!\n"); + Log(out, "Error removing unicode texture: {} ({})\n", err.message(), err.value()); + return false; + } + std::filesystem::remove(tastt_fonts_path / ("Bitmaps/font-ascii.png.meta"), err); + if (err.value()) { + Log(out, "failed!\n"); + Log(out, "Error removing unicode texture: {} ({})\n", err.message(), err.value()); + return false; + } + } { Log(out, "Generating guid.map... "); if (!InvokeWithArgs({ libunity_path, "guid_map", -- cgit v1.2.3