A change in one canvas updates the elements of another canvas

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!

Found a “solution”. I updated unity to the 2022 version and there is a new type of text field that does not update the rest of the UI. I still don’'t understand why it did not work before but this will do it for now