Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Hangs while trying to Build & Run for Android

Discussion in 'Editor & General Support' started by JoeStrout, Jul 11, 2018.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    7,358
    I've just joined a large project, and now I'm trying to compile for Android (Oculus Go). For starters, I have a made a minimal scene consisting of a plane, a handful of cubes, and the default camera and directional light. That's it.

    I set the build target to Android, added my scene, and unchecked the others (so my minimal scene is the only one in the build). I have my device plugged in. But when I try to Build & Run, the progress bar gets to about 20% and then goes no further. Unity is not completely locked up at this point; I can still drag the "Building Player" floating window around. But when Unity is frontmost, I get the rainbow spinning cursor, and I'm not able to cancel the build.

    The editor log shows nothing much, though there are lots of errors on shaders I'm not using. The tail end of the log is:

    And it gets no further, no matter how long I've let it sit. I let it go for about 40 minutes the first time. I've since force-quit and retried twice, and it appears to hang at this same point each time.

    I'm running Unity 2017.3 on macOS 10.13. Any idea what might be wrong here, and what I could try to fix it?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    7,358
    Hmm, I thought those shader errors were spurious, but maybe not; Activity Monitor shows a bunch of UnityShaderCompiler processes which are consuming large amounts of CPU:

    upload_2018-7-11_14-39-59.png

    And if I force-quit one of those shader compiler processes, Unity just relaunches it.

    So, shoot. How do I tell Unity "ignore these shaders that I'm not using, and just build the friggin' game"?