Line renderer optimisation

Hi,
in my project i need to generate 1000’s of line at runtime . The way i am doing this is by Creating a Gameobject object for each line and attaching a Line renderer component to it .But majority of these lines material are divided by 91 colors (each line width is different) .
Is it possible to reduce the drawcalls from 1000’s to 91 ?
The solution i found is to use these lines to generate a mesh using MeshTopology.Line
but i am not able to set the thickness of lines as i need to

if you’re not using URP, You can maybe use GPU instancing, it should render your line material in a single draw call.


If you’re using URP, you can use the SRP Batcher, which is supposed to do a similar work.