EllanJiang/GameFramework · error · GameFrameworkException
You can not use UpdateRetryCount at this time.
Error message
You can not use UpdateRetryCount at this time.
What it means
The ResourceManager.UpdateRetryCount property setter throws this when m_ResourceUpdater is null. Like other update-only settings, UpdateRetryCount lives on the ResourceUpdater, which is only instantiated once the resource system initializes the update pipeline.
Solutions
- Set UpdateRetryCount only after the resource updater has been created (post mode initialization).
- Guard with a resource-mode check and skip the assignment in non-updatable modes.
- Defer the assignment to the point in your bootstrap where update settings are valid.
Example fix
// before
m_ResourceManager.UpdateRetryCount = 3; // updater not created yet
// after
if (m_ResourceManager.ResourceMode == ResourceMode.Updatable)
{
m_ResourceManager.UpdateRetryCount = 3;
} Defensive patterns
Strategy: validation
Validate before calling
// C#
if (m_ResourceManager.ResourceMode == ResourceMode.Updatable)
{
m_ResourceManager.UpdateRetryCount = 3;
} Try / catch
// C#
try
{
m_ResourceManager.UpdateRetryCount = retryCount;
}
catch (GameFrameworkException ex) when (ex.Message.Contains("UpdateRetryCount"))
{
// defer setting until update mode is active
} Prevention
- Set retry counts only once the resource updater has been created.
- Keep update-only settings out of package-only mode presets.
- Gate all ResourceUpdater-backed properties behind a single mode check helper.
When it happens
Trigger: Setting UpdateRetryCount before the ResourceUpdater exists — i.e. before the resource system enters an updatable resource mode.
Common situations: Applying a settings preset at startup that includes retry counts while running in package-only mode; calling the setter earlier in Awake than the resource mode initialization.
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 GenerateReadWriteVersionListLength at this…
- 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/9e1006cf0bda24fd.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.cs:368
{
return m_ResourceUpdater != null ? m_ResourceUpdater.ApplyWaitingCount : 0;
}
}
/// <summary>
/// 获取或设置资源更新重试次数。
/// </summary>
public int UpdateRetryCount
{
get
{
return m_ResourceUpdater != null ? m_ResourceUpdater.UpdateRetryCount : 0;
}
set
{
if (m_ResourceUpdater == null)
{
throw new GameFrameworkException("You can not use UpdateRetryCount at this time.");
}
m_ResourceUpdater.UpdateRetryCount = value;
}
}
/// <summary>
/// 获取正在更新的资源组。
/// </summary>
public IResourceGroup UpdatingResourceGroup
{
get
{
return m_ResourceUpdater != null ? m_ResourceUpdater.UpdatingResourceGroup : null;
}
}
/// <summary>View on GitHub (pinned to d0c010b051)