Search Unity

Question I want to build an Android apk after converting HDRP scene to URP. But it takes but it takes long

Discussion in 'Shaders' started by NinefiveMedia, Nov 9, 2022.

  1. NinefiveMedia

    NinefiveMedia

    Joined:
    Jan 3, 2022
    Posts:
    2
    Unity version : 2021.3.5

    Hello, I am currently working on an HDRP project. I had to run this project on another device, so I tried to build it with Android, but I didn't support HDRP. So I changed the render pipeline to URP and built it to Android. And It takes hours to build. It takes a long time
    First build took 2 hours and 40 minutes, and then 4 minutes.
    But I think it takes too long even if it's the first build.
    I have to keep switching between HDRP and URP and I am worried if I have to wait for a long time again if the shader settings change.

    This project is not big. When building a desktop application, the build took usually 2~3 minutes and at most 10 minutes.
    This problem occurred when I switched to URP and started to build Android.

    There is no material using HDRP shader in the scene. At least the scenes I need for an Android build. This is because there are only UI and VideoPlayer in scenes for Android build. So there was no magenta-colored material and I didn't go through the process of converting the material from the HDRP Wizard.

    I didn't know that shader compilation would take this long because there was no place that used HDRP shader to build Android.
    I didn't see the whole process, but the place that took a long time to process was the Hidden/HDRP/Deferred Shader compilation part. Is Deferred Shader Compilation necessary in a mobile environment? I don't understand why you're going through this process. The Mesh data optimization process also took an incredibly long time. This part is solved after releasing the Player Setting-Optimization-Optimize Mesh Data toggle.
    upload_2022-11-9_18-7-41.png
    upload_2022-11-9_18-7-50.png
    upload_2022-11-9_18-7-57.png


    For your information, the desktop version and the Android version are different, but the reason why I'm doing it in the same project is that the two have to communicate with each other through Unity Multiplayer Netcode. I'm a network beginner.
     

    Attached Files:

    Last edited: Nov 9, 2022