The cimgui shipped with the ImGui.NET package is sadly not thread safe (the current internal context is a static field). Did a quick test and it crashed badly.
To make it thread safe we need to compile cimgui on our own. Did a quick test and it worked.
The steps to build a modified version with a thread static internal context are
In our project we then need to exclude the native asset with ExcludeAssets="native" on the ImGui.NET package reference and include the custom built one.
The
cimgui
shipped with theImGui.NET
package is sadly not thread safe (the current internal context is a static field). Did a quick test and it crashed badly. To make it thread safe we need to compile cimgui on our own. Did a quick test and it worked. The steps to build a modified version with a thread static internal context areimconfig.h
cimgui_template.cpp
after the cimgui includeNote: To run the generator you need to extract luajit (from https://luapower.com/luajit) and mingw64 (from https://github.com/niXman/mingw-builds-binaries/releases) and add both their bin folders to the path variable inside the generator.bat file.
In our project we then need to exclude the native asset with
ExcludeAssets="native"
on theImGui.NET
package reference and include the custom built one.