Describe the bug
When using a font atlas configuration with a custom font file, it crashed unity upon starting the game.
Even when using a callback as described in the readme, the same crash occurs randomly after multiple starts of the game.
To Reproduce
Steps to reproduce the behavior uning config:
Create a new Font Atrals Config
Assign a font to it
Assign it to U Im GUI component
Play the editor/game
Steps to reproduce the behavior uning config:
Used described method in readme, create method for custom font loading
Start the game and stop it multiple times
Version/Branch of UImGui:
Version: 4.1.0
Unity Version
2021.3.6f1
Render pipeline (URP)
Expected behavior
Editor should not crasah
Screenshots
Code
public class FontLoadingComponent : MonoBehaviour
{
public unsafe void LoadFontAwesome(ImGuiIOPtr io)
{
var fontPath = $"{Application.persistentDataPath}/Font Awesome 6 Free-Regular-400.otf";
io.Fonts.AddFontFromFileTTF(fontPath, 18, null, io.Fonts.GetGlyphRangesDefault());
}
}
Describe the bug When using a font atlas configuration with a custom font file, it crashed unity upon starting the game. Even when using a callback as described in the readme, the same crash occurs randomly after multiple starts of the game.
To Reproduce Steps to reproduce the behavior uning config:
U Im GUI
componentVersion/Branch of UImGui: Version: 4.1.0
Unity Version 2021.3.6f1
Render pipeline (URP)
Expected behavior Editor should not crasah
Screenshots
Code
Crash Report