Build time taking almost a day - URP

Unity 6.0.5f here. Same neverending build for Unity URP Template - web build, windows build. I just don’t want to wait for a day to check out how long that would be compared to 2022LTS :slight_smile:
Specs: 11800h, 39GB free NVME SSD space, 24GB Ram, 3050Ti

First build after changing editor version is going to take hours… and hours… and hours…
Second build will take 10% of that time
Third build will take 10% of second build time and all builds after will take this same amount of time.

For instance my builds:
First: 13 hours
Second: 3 hours
Third and all after: 12 minutes.

2022 had the same issue, so that is not the case. My issue was related to the Unity’s URP Demo Template, and the problem has gone when not using that template for the start. But if I’d make a bigger game does that mean I should wait that long for no reason?

URP Unity 6, omg, how fix?
Screenshot_6

1 Like

Same issue here, though mine is not nearly as bad as yours.
image

I wake up to a failed build :sweat:

I dont have a solution but I have a workaround. Switch to asset bundles, not addressables, with a little chatgpt you can build specific labels and you wont have to build them everytime you make a game build. You can start building label by lable and see where the problematic shaders are tho.

here’s an example, you could probably make a build script for addressables but i have so many other issues with them i just can’t recommend them

using UnityEditor;
using System.IO;

public class BuildAssetBundles
{
    [MenuItem("Assets/Build Specific Asset Bundle")]
    public static void BuildSpecificAssetBundle()
    {
        // Specify the bundle name you want to build
        string bundleName = "my_specific_bundle";

        // Define the output path for the bundle
        string outputPath = "Assets/AssetBundles";

        // Create directory if it doesn't exist
        if (!Directory.Exists(outputPath))
        {
            Directory.CreateDirectory(outputPath);
        }

        // Get all the assets that are tagged with this bundle name
        AssetBundleBuild[] buildMap = new AssetBundleBuild[1];
        buildMap[0].assetBundleName = bundleName;
        buildMap[0].assetNames = AssetDatabase.GetAssetPathsFromAssetBundle(bundleName);

        // Build the specified bundle
        BuildPipeline.BuildAssetBundles(outputPath, buildMap, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);

        EditorUtility.DisplayDialog("Asset Bundle Build", "Specific asset bundle built successfully!", "OK");
    }
}

I’m facing the same issue, 50000+ takes 3 days to build