Issue with UI when updating to latest patch

So we tried to move to 5.2 and a UI issue showed up. Then we decided to move to 5.2.1.p4 and the UI worked. But something new showed up.

It shows as error but it won’t break the running, it just keeps on showing when saving, running, switching scene, picking nose, using input or else.

This seems to be internal as we are not using those methods directly. Is there anything we can do or should we wait for the next patch (and its bunch of new issues)?

Do you have a really large tiled image or something?

I have a lot of sprites for the UI that are all batched into sprite packers. Actually turns out to be about 3 of them in the end.
I have found a thread talking about Sprite-Default material but it did not fix it.
All images are fairly small, max size might be around 600x600. I will have a second look about the dimension though.
Unfortunately, most of them are NPOT could that be a reason?

Ok That did it. There was one 1x1 image set to tiled and there was the problem.

I have the same error. Your are made many UI-bugs in 5.2 and don’t fix it

ArgumentException: Mesh can not have more than 65000 vertices
UnityEngine.UI.VertexHelper.FillMesh (UnityEngine.Mesh mesh) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Utility/VertexHelper.cs:78)
UnityEngine.UI.Graphic.DoMeshGeneration () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:382)
UnityEngine.UI.Graphic.UpdateGeometry () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:364)
UnityEngine.UI.Graphic.Rebuild (CanvasUpdate update) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Graphic.cs:324)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:149)
UnityEngine.Canvas:SendWillRenderCanvases()

Thats a large mesh issue. Likely caused when the UI is batched together, do you have a lot of UI components or a tiled sprite? tiled sprite vertices can shoot up quickly, a good solution to this is to use a shader to do the tiling instead.

What shader do you advice? Can’t get tiled effect with shader, it shows only 1x1 stretched, though set to 50x50. Tried all standart UI shaders.

You need to change the Tiling value in the material settings.

Of course there! (Where could I do it else?) Please share what shader do you use in this case.

Unlit/Texture is a pretty good one

What else can I do wrong? UI image ignores tiling from material and shows 1x1.
2708351--192020--2016-07-13_160500.jpg 2708351--192021--2016-07-13_160546.jpg 2708351--192022--2016-07-13_160526.jpg

Try this instead. Use a RawImage instead of Image and change the UV Rect properties. The bottom 2 values control tiling.

That works! Thank you!

1 Like