ImGui.NET
ImGui.NET copied to clipboard
ImGui.GetStyleColorVec4 returns a pointer
Example (unsafe context):
Vector4* textColor = ImGui.GetStyleColorVec4(ImGuiCol.Text);
ImGui.PushStyleColor(ImGuiCol.Text, *textColor);
This doesn't seem to be intentional.
Using 1.87.3 via NuGet.
Unfortunately, it kind-of does seem to be expected based on the native definition: https://github.com/ocornut/imgui/blob/92d0924b82dcc1c7159977d29a9c5044ff85459d/imgui.h#L422
It returns a reference (supposed to be const) to the portion of the style structure for the given color type. What you're doing above should work just fine, but it's not a great way to expose this functionality.