#NullReference when trying to build asset bundle
1 messages · Page 1 of 1 (latest)
This happens in both a new 3D URP project, and the unity URP example.
Unity also stops rendering anything in the scene window after this happens.
Until the asset bundle is built, rendering works fine
.unitypackage includes the assets
asset bundles are built using the editor script:
using UnityEditor;
using System.IO;
public class CreateAssetBundles
{
[MenuItem("Assets/Build AssetBundles")]
static void BuildAllAssetBundles()
{
string assetBundleDirectory = "Assets/AssetBundles";
if (!Directory.Exists(assetBundleDirectory))
{
Directory.CreateDirectory(assetBundleDirectory);
}
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, EditorUserBuildSettings.activeBuildTarget);
}
}