- Home /
How to resolve the 65535 vertices error with Canvas ?
Hello everyone,
I'm working with a single Canvas with only a few button. I'm using Vectrosity and i have to display a lot of lines.
And i have the error : Canvas element contains more than 65535 vertices. This is not supported. So i'm wondering if there is a solution to go further this.
I though of creating multiples Canvas, but it doesn't seems to work, but maybe i don't use it the right way. If needed, i can find a way to know the number of vertices in my canvas.
I'm open to every suggestions that i should test,
Thank you for reading,
If you found the answer post it as an answer. No problem if it's the same user.
Answer by ReCoF · Jul 21, 2015 at 10:20 AM
I actually found a solution :
I create a new VectorCanvas3D every 10.000 lines.
foreach (PathSegment pathSegment in pathSegmentsContainer.list) {
Vector3[] vectors = CreatesVectors(pathSegment, deca); // Creates my Vector[ ]
var vectLine = new VectorLine ("MyLine", vectors, lineMaterial, pathWidth, LineType.Discrete, Joins.Weld ); vectLine.drawTransform = wire.gameObject.transform; // In order to follow my main object vectLine.Draw3DAuto ();
canvasCount += vectors.Length;
vectLine.canvasID = (int)(canvasCount/10000); // Increment one by one every 10.000 lines.
Answer by Bilelmnasser · Sep 04, 2015 at 03:55 PM
Solution : add canvas scaler to your canvas than put 100 in the Reference Pixels