Closed c-schembri closed 1 year ago
I figured it out and am documenting here if anyone else comes across this problem.
Instead of writing something like this:
float value = 1.0f;
ImGui.PlotLines("Plot Lines", ref value, n);
Use an array (like the C++ implementation) and simply pass the reference to the first element of the array:
float[] values = new[] { 0, 1.1f, 2.2f, 3.3f, 40.4f, 5.5f, 6.6f, 7.7f, 80.8f, 9.9f, 10.0f };
ImGui.PlotLines("Plot Lines", ref values[0], values.Length);
The C++ implementation accepts a pointer to an array of values like so:
However, this API only accepts a reference to a single float:
I'm probably missing something but I don't know what.