{"record":{"id":"5773d4e84b087115","repo":"EllanJiang/GameFramework","slug":"you-can-not-use-updateversionlist-at-this-time","errorCode":null,"errorMessage":"You can not use UpdateVersionList at this time.","messagePattern":"You can not use UpdateVersionList at this time\\.","errorType":"exception","errorClass":"GameFrameworkException","httpStatus":null,"severity":"error","filePath":"GameFramework/Resource/ResourceManager.cs","lineNumber":1167,"sourceCode":"        {\n            if (updateVersionListCallbacks == null)\n            {\n                throw new GameFrameworkException(\"Update version list callbacks is invalid.\");\n            }\n\n            if (m_ResourceMode == ResourceMode.Unspecified)\n            {\n                throw new GameFrameworkException(\"You must set resource mode first.\");\n            }\n\n            if (m_ResourceMode != ResourceMode.Updatable && m_ResourceMode != ResourceMode.UpdatableWhilePlaying)\n            {\n                throw new GameFrameworkException(\"You can not use UpdateVersionList without updatable resource mode.\");\n            }\n\n            if (m_VersionListProcessor == null)\n            {\n                throw new GameFrameworkException(\"You can not use UpdateVersionList at this time.\");\n            }\n\n            m_UpdateVersionListCallbacks = updateVersionListCallbacks;\n            m_VersionListProcessor.UpdateVersionList(versionListLength, versionListHashCode, versionListCompressedLength, versionListCompressedHashCode);\n        }\n\n        /// <summary>\n        /// 使用可更新模式并校验资源。\n        /// </summary>\n        /// <param name=\"verifyResourceLengthPerFrame\">每帧至少校验资源的大小，以字节为单位。</param>\n        /// <param name=\"verifyResourcesCompleteCallback\">使用可更新模式并校验资源完成时的回调函数。</param>\n        public void VerifyResources(int verifyResourceLengthPerFrame, VerifyResourcesCompleteCallback verifyResourcesCompleteCallback)\n        {\n            if (verifyResourcesCompleteCallback == null)\n            {\n                throw new GameFrameworkException(\"Verify resources complete callback is invalid.\");\n            }\n","sourceCodeStart":1149,"sourceCodeEnd":1185,"githubUrl":"https://github.com/EllanJiang/GameFramework/blob/d0c010b05167c58e92350449d04864a91ca13fd2/GameFramework/Resource/ResourceManager.cs#L1149-L1185","documentation":"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.","triggerScenarios":"Calling UpdateVersionList in an updatable mode before the VersionListProcessor helper component was created, or after helpers were destroyed/torn down.","commonSituations":"Raw ResourceManager construction outside the GameFramework component lifecycle; calling update APIs before component Awake; partial teardown followed by reuse.","solutions":["Let the ResourceComponent fully initialize (creating m_VersionListProcessor) before UpdateVersionList.","Use the framework component lifecycle rather than new ResourceManager().","Check that no code destroys helper components between CheckVersionList and UpdateVersionList."],"exampleFix":"// before\nvar rm = new ResourceManager();\nrm.UpdateVersionList(len, hash, cLen, cHash, callbacks);\n// after\n// via initialized GameFramework ResourceComponent:\nm_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks);","handlingStrategy":"validation","validationCode":"if (m_ResourceComponent.ResourceMode == ResourceMode.Updatable && m_ResourceComponent.Ready)\n    m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks);","typeGuard":null,"tryCatchPattern":"try { m_ResourceComponent.UpdateVersionList(len, hash, cLen, cHash, callbacks); }\ncatch (GameFrameworkException e) { Log.Fatal(\"VersionListProcessor not ready: {0}\", e.Message); }","preventionTips":["Ensure ResourceComponent completed initialization before update calls.","Use the component lifecycle, not raw ResourceManager construction.","Verify helper components persist between CheckVersionList and UpdateVersionList."],"tags":["unity","gameframework","resource-manager","missing-dependency","lifecycle"],"backgroundTag":"missing-dependency","analyzedSha":"d0c010b05167c58e92350449d04864a91ca13fd2","analyzedAt":"2026-09-15T13:37:15.352Z","contentChangedAt":"2026-09-15T13:37:15.352Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}