Draw.LineDashStyle (or perhaps just DashSize?) is sometimes not respected on Android

Avatar
  • updated
  • Under Review

Hi, I don't have a great repro for this because it only happens occasionally but I figured I'd at least put it on your radar.

This code draws a dashed line from point A to point B, the dashes move over time. 

        Draw.LineDashStyle = new DashStyle(2f, 3f, Time.fixedTime) {
            type = DashType.Basic
        };
 
        Draw.LineDashed(pointA, pointB);

On Windows (in the editor and in a build) this is all well and good. However after building on Android and running on a native device (Galaxy Note 9 in my case) it appeared that the dashes all had a size of 1. Not a huge issue (in this case I'm using Shapes to draw selection boxes around my UI elements so it was still clear enough). Weirdly though it fixed itself halfway through the play session. No idea what changed.


This is not blocking anything for me, for the sake of my game it's just a minor UI quirk, just thought I'd call it out. Thanks!

Reporting a bug? please specify Unity version:
2019.4.14f1
Reporting a bug? please specify Shapes version:
2.3.1
Reporting a bug? please specify Render Pipeline:
Avatar
Freya Holmér creator
  • Under Review

have you been able to test this in isolation, outside the context of your game loop code? Just want to make sure it's not part of your game loop/drawing logic in that particular setup!

Avatar
Wyatt Chapman

Hiya. Sorry for the delayed response. I set up a project this morning that attempts to repro. No luck yet. I think it had something to do with closing the game and reopening it without killing the process (the smartphone equivalent of alt-tabbing).

So far I can't repro in the minimal case. I'll keep playing around with it.

Avatar
Freya Holmér creator

thanks! let me know if you can find a case that breaks it. otherwise I'll close this unless we can't find a repro