Hi everyone. I have a problem to which I can’t find an answer for. Basically, I have a custom UI graph for a racing game that shows a car speed throughout a lap. This graph can end up with over 6k points. Until now, every update I would only add the last point to the graph and connect it to the previous one. The problem is that know I have added a text to show exactly the current speed. Every time I update this text, the canvas is marked as dirty, and the graph will clear itself.
After some investigation, I’ve read that the solution to this problem is to separate both elements into different canvases so that a change in one, won’t affect the other one. The problem is that even if I separate the graph and the text into two canvases, the problem remains, and the graph will clear itself every update.
The only solution I have is to repaint the entire graph every time the OnPopulateMesh() method is called, but this affects quite a lot the performance of the game.
Any suggestion to how con I fix this problem?
Have a great day everyone!