Immediate mode arcs not rendering in standalone build

Avatar
  • updated
  • Under Review

Arcs drawn in immediate mode work in the editor, but not in standalone builds when there is a Shapes component in a canvas in the scene. I tried disabling shader stripping in the project settings and disabling immediate mode instancing in the Shapes settings, but the problem still happens.

Here's a sample project that demonstrates the problem. If you make a build as is with SampleScene, it should not display any arcs. But, if you remove the UICanvas from the scene and try again, you should see the visualization.

Reporting a bug? please specify Unity version:
2021.1.4f1
Reporting a bug? please specify Shapes version:
3.2.3
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
steve

I don't think I tried any shapes other than arcs.

The only angle used in the sample project (and I believe also in the original project where I first ran into this) is Mathf.PI * 2f.

Avatar
Freya Holmér creator

is this only related to arcs, but all other shapes work fine?

and if it is only arcs - do you have negative values somewhere in the angle properties? I've had reports that this is broken somehow on some platforms

Avatar
steve
Quote from Freya Holmér

hey! just wanted to check in to see if this is still an issue in the latest version?

I updated and tested, and it does still seem to be the same problem.

Avatar
Freya Holmér creator
  • Under Review

hey! just wanted to check in to see if this is still an issue in the latest version?

Avatar
steve

I've now spent some time trying to work around this in our project, and it appears that the canvas was a red herring, and it was only the Line component that was interfering. I tried removing all Shapes components from our scenes and seeing if the immediate mode rendering would work in a standalone build, but it didn't. But, if I put a single Polyline back inside a canvas in the scene, the immediate mode arcs would work. If I put a single Line in that same canvas with the Poliline, the arcs once again don't render. It gets more confusing, because it doesn't seem to be 100% consistent. If I then remove the object with the single Polyline, the arcs still show up in the build. So it seems like it should be related to Unity stripping something out in some cases, but I can't quite make sense of it yet.