EllanJiang/GameFramework · error · GameFrameworkException

You can not use UpdateResources at this time.

Error message

You can not use UpdateResources at this time.

What it means

This GameFrameworkException is thrown by ResourceManager.UpdateResources when m_ResourceUpdater is null despite being in a valid updatable mode — the resource updater has not been created/initialized yet. The manager cannot perform a group update without its updater component, so it rejects the call. It is a readiness-state guard.

Solutions

  1. Call UpdateResources only after the update flow has started and the updater exists (e.g. after successful version check).
  2. Follow the standard order: set updatable mode, run version check/update version flow, then update resource groups.
  3. Verify the resource update helper chain is registered so the updater gets created.

Example fix

// before
resourceManager.Initialize(ResourceMode.Updatable, ...);
resourceManager.UpdateResources("MyGroup", callback); // updater null
// after
resourceManager.Initialize(ResourceMode.Updatable, ...);
// after version check completes and updater is created:
resourceManager.UpdateResources("MyGroup", callback);
Defensive patterns

Strategy: try-catch

Validate before calling

StartUpdateFlow(onReady: () => resourceManager.UpdateResources(groupName, callback));

Try / catch

try { resourceManager.UpdateResources(groupName, callback); }
catch (GameFrameworkException ex) when (ex.Message.Contains("at this time")) { UnityEngine.Debug.LogError("Resource updater not ready; wait for version check to complete."); }

Prevention

When it happens

Trigger: Calling UpdateResources after mode setup but before the update pipeline instantiated the updater; calling it before the version-check flow that creates the updater; custom bootstraps skipping the update startup.

Common situations: Update UI triggering group updates before the version-check step completes; calling update APIs too early in startup; third-party integrations that bypass the standard flow.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15). Data as JSON: /api/errors/e6738ff394bacaf0. Report an issue: GitHub.

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.cs:1316

        {
            if (updateResourcesCompleteCallback == null)
            {
                throw new GameFrameworkException("Update resources complete callback 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 UpdateResources without updatable resource mode.");
            }

            if (m_ResourceUpdater == null)
            {
                throw new GameFrameworkException("You can not use UpdateResources at this time.");
            }

            ResourceGroup resourceGroup = (ResourceGroup)GetResourceGroup(resourceGroupName);
            if (resourceGroup == null)
            {
                throw new GameFrameworkException(Utility.Text.Format("Can not find resource group '{0}'.", resourceGroupName));
            }

            m_UpdateResourcesCompleteCallback = updateResourcesCompleteCallback;
            m_ResourceUpdater.UpdateResources(resourceGroup);
        }

        /// <summary>
        /// 停止更新资源。
        /// </summary>
        public void StopUpdateResources()
        {
            if (m_ResourceMode == ResourceMode.Unspecified)

View on GitHub (pinned to d0c010b051)