EllanJiang/GameFramework · error · GameFrameworkException
You can not use GenerateReadWriteVersionListLength at this…
Error message
You can not use GenerateReadWriteVersionListLength at this time.
What it means
The ResourceManager.GenerateReadWriteVersionListLength property setter throws this when m_ResourceUpdater is null. The updater (and with it this setting) only exists after the resource system enters update mode (e.g. SetResourceMode with update enabled); before that there is nothing to configure.
Solutions
- Set the property only after entering an update mode where the ResourceUpdater exists (after the updater has been created by the resource system's init).
- Skip the setting when the game runs in non-updatable resource modes.
- Wrap the setter in a null/state check on your side and defer the assignment until the updater is available.
Example fix
// before
m_ResourceManager.GenerateReadWriteVersionListLength = 1024 * 1024; // updater not created yet
// after
if (m_ResourceManager.ResourceMode == ResourceMode.Updatable)
{
m_ResourceManager.GenerateReadWriteVersionListLength = 1024 * 1024;
} Defensive patterns
Strategy: validation
Validate before calling
// C#
if (m_ResourceManager.ResourceMode == ResourceMode.Updatable)
{
m_ResourceManager.GenerateReadWriteVersionListLength = 1024 * 1024;
} Try / catch
// C#
try
{
m_ResourceManager.GenerateReadWriteVersionListLength = value;
}
catch (GameFrameworkException ex) when (ex.Message.Contains("GenerateReadWriteVersionListLength"))
{
// defer setting until update mode is active
} Prevention
- Only apply update-related settings after the resource updater exists (update mode active).
- Split startup config into 'always' and 'update-only' groups.
- When defaults fail, move the assignment to the point where update mode is initialized.
When it happens
Trigger: Setting GenerateReadWriteVersionListLength at startup before the resource updater has been created by the resource system's initialization/mode switch.
Common situations: Config scripts that apply all ResourceManager settings up front, including update-only settings, in non-update resource modes; settings applied before SetResourceMode(ResourceMode.Package/Updatable...).
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 UpdateRetryCount at this time.
- Resource manager is invalid.
- Update version list callbacks is invalid.
- You can not use CheckVersionList at this time.
- You can not use CheckVersionList without updatable resource…
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/8b5667a93ae01c74.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.cs:326
{
m_UpdatePrefixUri = value;
}
}
/// <summary>
/// 获取或设置每更新多少字节的资源,重新生成一次版本资源列表。
/// </summary>
public int GenerateReadWriteVersionListLength
{
get
{
return m_ResourceUpdater != null ? m_ResourceUpdater.GenerateReadWriteVersionListLength : 0;
}
set
{
if (m_ResourceUpdater == null)
{
throw new GameFrameworkException("You can not use GenerateReadWriteVersionListLength at this time.");
}
m_ResourceUpdater.GenerateReadWriteVersionListLength = value;
}
}
/// <summary>
/// 获取正在应用的资源包路径。
/// </summary>
public string ApplyingResourcePackPath
{
get
{
return m_ResourceUpdater != null ? m_ResourceUpdater.ApplyingResourcePackPath : null;
}
}
/// <summary>View on GitHub (pinned to d0c010b051)