EllanJiang/GameFramework · error · GameFrameworkException
You can not use UpdateVersionList without updatable…
Error message
You can not use UpdateVersionList without updatable resource mode.
What it means
Thrown by ResourceManager.UpdateVersionList when the resource mode is concrete but not updatable (ResourceMode.Package). Version-list updating only exists for Updatable and UpdatableWhilePlaying modes.
Solutions
- Use ResourceMode.Updatable or UpdatableWhilePlaying for the version-list flow.
- Branch your bootstrap on the resource mode and skip update APIs in Package builds.
- Align build configuration with the code path (strip update flow for packaged builds).
Example fix
// before resourceComponent.SetResourceMode(ResourceMode.Package); resourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks); // after resourceComponent.SetResourceMode(ResourceMode.Updatable); resourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks);
Defensive patterns
Strategy: validation
Validate before calling
if (m_ResourceComponent.ResourceMode == ResourceMode.Updatable || m_ResourceComponent.ResourceMode == ResourceMode.UpdatableWhilePlaying)
m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks); Try / catch
try { m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks); }
catch (GameFrameworkException e) { Log.Fatal("UpdateVersionList in non-updatable mode: {0}", e.Message); } Prevention
- Only run the version-list flow in updatable modes.
- Use compile-time or bootstrap flags to strip update code from Package builds.
- Keep one code path per resource mode.
When it happens
Trigger: Calling UpdateVersionList while m_ResourceMode == ResourceMode.Package.
Common situations: Package-mode build still executing hot-update code path (shared GameEntry logic), or the mode flipped to Package without disabling the update flow.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- You can not use InitResources without package resource mode.
- You can not use CheckVersionList without updatable resource…
- You must set resource mode first.
- You can not use InitResources at this time.
- You can not use CheckVersionList at this time.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/3dca4cedc5266050.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.cs:1162
/// <param name="versionListHashCode">版本资源列表哈希值。</param>
/// <param name="versionListCompressedLength">版本资源列表压缩后大小。</param>
/// <param name="versionListCompressedHashCode">版本资源列表压缩后哈希值。</param>
/// <param name="updateVersionListCallbacks">版本资源列表更新回调函数集。</param>
public void UpdateVersionList(int versionListLength, int versionListHashCode, int versionListCompressedLength, int versionListCompressedHashCode, UpdateVersionListCallbacks updateVersionListCallbacks)
{
if (updateVersionListCallbacks == null)
{
throw new GameFrameworkException("Update version list callbacks is invalid.");
}
if (m_ResourceMode == ResourceMode.Unspecified)
{
throw new GameFrameworkException("You must set resource mode first.");
}
if (m_ResourceMode != ResourceMode.Updatable && m_ResourceMode != ResourceMode.UpdatableWhilePlaying)
{
throw new GameFrameworkException("You can not use UpdateVersionList without updatable resource mode.");
}
if (m_VersionListProcessor == null)
{
throw new GameFrameworkException("You can not use UpdateVersionList at this time.");
}
m_UpdateVersionListCallbacks = updateVersionListCallbacks;
m_VersionListProcessor.UpdateVersionList(versionListLength, versionListHashCode, versionListCompressedLength, versionListCompressedHashCode);
}
/// <summary>
/// 使用可更新模式并校验资源。
/// </summary>
/// <param name="verifyResourceLengthPerFrame">每帧至少校验资源的大小,以字节为单位。</param>
/// <param name="verifyResourcesCompleteCallback">使用可更新模式并校验资源完成时的回调函数。</param>
public void VerifyResources(int verifyResourceLengthPerFrame, VerifyResourcesCompleteCallback verifyResourcesCompleteCallback)
{View on GitHub (pinned to d0c010b051)