EllanJiang/GameFramework · error · GameFrameworkException

You can not use UpdateVersionList at this time.

Error message

You can not use UpdateVersionList at this time.

What it means

Thrown by ResourceManager.UpdateVersionList when the resource mode is Package (or unspecified). Downloading a new version list only makes sense in updatable modes; in Package mode there is no update flow, so the call is rejected as a configuration/state error.

Solutions

  1. Let the ResourceComponent fully initialize (creating m_VersionListProcessor) before UpdateVersionList.
  2. Use the framework component lifecycle rather than new ResourceManager().
  3. Check that no code destroys helper components between CheckVersionList and UpdateVersionList.

Example fix

// before
var rm = new ResourceManager();
rm.UpdateVersionList(len, hash, cLen, cHash, callbacks);
// after
// via initialized GameFramework ResourceComponent:
m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks);
Defensive patterns

Strategy: validation

Validate before calling

if (m_ResourceComponent.ResourceMode == ResourceMode.Updatable && m_ResourceComponent.Ready)
    m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks);

Try / catch

try { m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks); }
catch (GameFrameworkException e) { Log.Fatal("VersionListProcessor not ready: {0}", e.Message); }

Prevention

When it happens

Trigger: Calling UpdateVersionList in an updatable mode before the VersionListProcessor helper component was created, or after helpers were destroyed/torn down.

Common situations: Raw ResourceManager construction outside the GameFramework component lifecycle; calling update APIs before component Awake; partial teardown followed by reuse.

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/5773d4e84b087115. Report an issue: GitHub.

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.cs:1167

        {
            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)
        {
            if (verifyResourcesCompleteCallback == null)
            {
                throw new GameFrameworkException("Verify resources complete callback is invalid.");
            }

View on GitHub (pinned to d0c010b051)