EllanJiang/GameFramework · error · GameFrameworkException
Verify resources complete callback is invalid.
Error message
Verify resources complete callback is invalid.
What it means
Thrown by ResourceManager.VerifyResources when the verifyResourcesCompleteCallback parameter is null. The manager requires a callback so it can report verification results (success/failure counts) when resource verification finishes, and refuses to start without one.
Solutions
- Pass a non-null VerifyResourcesCompleteCallback delegate, even if it only logs the result.
- Check that the callback variable is assigned before calling VerifyResources.
- Wrap the call in try-catch for GameFrameworkException to surface the configuration mistake early.
Example fix
// before
m_ResourceManager.VerifyResources(1024 * 1024, null);
// after
m_ResourceManager.VerifyResources(1024 * 1024, OnVerifyResourcesComplete);
private void OnVerifyResourcesComplete(int removedCount, int totalCount) { ... } Defensive patterns
Strategy: validation
When it happens
Trigger: Calling VerifyResources(int, VerifyResourcesCompleteCallback) with a null callback, e.g. resourceManager.VerifyResources(1024 * 1024, null) or passing an uninitialized delegate variable.
Common situations: Forgetting to hook the verification-complete handler in the update pipeline; refactoring code that removed the callback subscription; conditional logic that only assigns the callback in one branch.
Related errors
- Check resources complete callback is invalid.
- Decrypt resource callback is invalid.
- Delta length is invalid.
- Length is invalid.
- Offset is invalid.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/a84db9493b98de34.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/Resource/ResourceManager.cs:1183
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.");
}
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 VerifyResources without updatable resource mode.");
}
if (m_RefuseSetFlag)
{
throw new GameFrameworkException("You can not verify resources at this time.");
}
m_ResourceVerifier = new ResourceVerifier(this);View on GitHub (pinned to d0c010b051)