Draw.Line in ImmediateModeShapeDrawer not shown on Android/iOS
Hello, Freya, and thanks for the amazing plugin!
I encountered that a straight line drawn with a simple Draw.Line() is showing good in Unity edit/play modes, but is not been drawn on mobile device. I tried either Android and iPhone.
I found a similar post here https://shapes.userecho.com/en/communities/1/topics/192-immediate-mode-drawline-not-appearing-in-standalone-build and as recommended there I turned off GPU instancing for Immediate Mode in Shapes Settings.
This workaround works for me (at least I already tested on iPhone).
I still decided to post a message here just to let you know.
My code is pretty simple:
public class DrawController : ImmediateModeShapeDrawer{
...
public override void DrawShapes( Camera cam )
{ if( cam != this.cam ) return;
using( Draw.Command( cam ) )
{
Draw.ZTest = CompareFunction.Always;
Draw.Matrix = parentTransform.localToWorldMatrix;
Draw.BlendMode = ShapesBlendMode.Transparent;
Draw.LineGeometry = LineGeometry.Flat2D;
Draw.Line(new Vector2(-1, 1), new Vector2(-1, -1), 0.05);
...
can you try and do a clean reinstall and see if it helps? also, do the platforms you target support GPU instancing?