egametang/ET · error · BuildFailedException
hot update assembly name cann't be empty
Error message
hot update assembly name cann't be empty
What it means
Thrown by FilterHotFixAssemblies.OnFilterBuildAssemblies when iterating over the configured hot-update assembly names and encountering one that is null, empty, or whitespace. This runs during the build's assembly-filtering phase to strip hot-update DLLs from the main build. An empty entry in the list is treated as a configuration error rather than silently skipped.
Source
Thrown at Packages/cn.etetet.hybridclr/Scripts/Editor/Share/BuildProcessors/FilterHotFixAssemblies.cs:36
{
public int callbackOrder => 0;
public string[] OnFilterAssemblies(BuildOptions buildOptions, string[] assemblies)
{
if (!SettingsUtil.Enable)
{
Debug.Log($"[FilterHotFixAssemblies] disabled");
return assemblies;
}
List<string> allHotUpdateDllNames = SettingsUtil.HotUpdateAssemblyNamesExcludePreserved;
// 检查是否重复填写
var hotUpdateDllSet = new HashSet<string>();
foreach(var hotUpdateDll in allHotUpdateDllNames)
{
if (string.IsNullOrWhiteSpace(hotUpdateDll))
{
throw new BuildFailedException($"hot update assembly name cann't be empty");
}
if (!hotUpdateDllSet.Add(hotUpdateDll))
{
throw new BuildFailedException($"hot update assembly:{hotUpdateDll} is duplicated");
}
}
var assResolver = MetaUtil.CreateHotUpdateAssemblyResolver(EditorUserBuildSettings.activeBuildTarget, allHotUpdateDllNames);
// 检查是否填写了正确的dll名称
foreach (var hotUpdateDllName in allHotUpdateDllNames)
{
if (assemblies.Select(Path.GetFileNameWithoutExtension).All(ass => ass != hotUpdateDllName)
&& string.IsNullOrEmpty(assResolver.ResolveAssembly(hotUpdateDllName, false)))
{
throw new BuildFailedException($"hot update assembly:{hotUpdateDllName} doesn't exist");
}
}
View on GitHub (pinned to 5cab01f7a8)
Solutions
- Open HybridCLRSettings (Project Settings > HybridCLR or the settings asset) and remove any empty or blank entries from the hot update assemblies list.
- If managing settings programmatically, filter out null/empty strings before assigning the array.
- Inspect the serialized HybridCLRSettings asset in a text editor to find stray empty elements.
- Re-enter the hot update assembly names cleanly, ensuring each is a valid assembly name without whitespace.
Example fix
// before — settings contains: ["HotUpdate", "", "GameLogic"]
// FilterHotFixAssemblies throws on the empty entry
// fix — clean the list in HybridCLRSettings:
// hotUpdateAssemblies: ["HotUpdate", "GameLogic"] (remove the empty string)
// programmatic guard before build:
var names = SettingsUtil.HybridCLRSettings.hotUpdateAssemblies
.Where(n => !string.IsNullOrWhiteSpace(n))
.ToArray();
SettingsUtil.HybridCLRSettings.hotUpdateAssemblies = names; Defensive patterns
Strategy: validation
Validate before calling
var names = SettingsUtil.HybridCLRSettings.hotUpdateAssemblies;
if (names != null)
{
foreach (var name in names)
{
if (string.IsNullOrWhiteSpace(name))
{
Debug.LogError("An empty or null entry exists in HybridCLRSettings.hotUpdateAssemblies. Remove it before building.");
}
}
} Type guard
static bool HasNoEmptyEntries(string[] names)
{
return names == null || names.All(n => !string.IsNullOrWhiteSpace(n));
} Try / catch
try
{
BuildPipeline.BuildPlayer(scenes, outputPath, buildTarget, buildOptions);
}
catch (BuildFailedException ex) when (ex.Message.Contains("cann't be empty"))
{
Debug.LogError("A hot-update assembly name is empty. Open HybridCLRSettings and remove blank entries.");
} Prevention
- When editing the hotUpdateAssemblies list in the inspector, delete empty array elements rather than clearing them.
- Inspect the serialized HybridCLRSettings asset file for stray empty strings.
- Programmatically filter out null/empty entries before assigning the settings array.
- Add a pre-build validation step that checks for empty or invalid assembly names.
When it happens
Trigger: OnFilterBuildAssemblies iterates SettingsUtil.HotUpdateAssemblyNamesExcludePreserved (which combines hotUpdateAssemblies and hotUpdateAssemblyDefinitions from HybridCLRSettings). If any entry is null or whitespace, the BuildFailedException is thrown during build preprocessing.
Common situations: A stray empty string or null in the HybridCLRSettings hotUpdateAssemblies array (e.g. left by the Unity inspector when adding then clearing an element); a serialized settings asset with a trailing empty entry; programmatic settings modification that inserted null; copy-paste errors leaving blank lines in the list.
Related errors
- hot update assembly:{hotUpdateDll} is duplicated
- resolve Hot update dll:{assemblyName} failed! Please make su
- can't find xxxx.xcodeproj/project.pbxproj in {pathToBuiltPro
- hot update assembly:{hotUpdateDllName} doesn't exist
- ERR_LocationPrimaryUnavailable
AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13).
Data as JSON: /api/errors/266f440806adc483.
Report an issue: GitHub.