EllanJiang/GameFramework · error · GameFrameworkException

Check resources ' ' error with unknown status.

Error message

Check resources '{0}' error with unknown status.

What it means

RefreshCheckInfoStatus switches on CheckInfo.CheckStatus after refreshing each resource's status. All expected statuses (StorageInReadOnly, StorageInReadWrite, Update, Unavailable, Disuse) are handled; any other value falls into the else branch and throws this GameFrameworkException naming the resource. This is an internal invariant — CheckStatus should never hold another value.

Solutions

  1. Log ci.Status for the offending resource and check whether the enum was extended by custom code.
  2. If CheckStatus was extended, add a handler branch for the new value in RefreshCheckInfoStatus.
  3. Otherwise treat it as state corruption: clear ReadWritePath/version lists and rerun the resource check.

Example fix

// before: new enum value with no branch
else
{
    throw new GameFrameworkException(...unknown status...);
}

// after
else if (ci.Status == CheckInfo.CheckStatus.MyNewStatus)
{
    // handle the new status
}
else
{
    throw new GameFrameworkException(...);
}
Defensive patterns

Strategy: try-catch

Type guard

static bool IsKnownStatus(ResourceCheckerCheckStatus s) =>
    s == CheckStatus.StorageInReadOnly || s == CheckStatus.StorageInReadWrite ||
    s == CheckStatus.Update || s == CheckStatus.Unavailable || s == CheckStatus.Disuse;

Try / catch

try { m_ResourceComponent.CheckResources(); }
catch (GameFrameworkException ex) when (ex.Message.Contains("unknown status"))
{
    Debug.LogError($"CheckStatus invariant broken: {ex.Message}");
}

Prevention

When it happens

Trigger: A CheckInfo.Status value outside the enumerated expected set after ci.RefreshStatus(...) — practically unreachable unless CheckStatus was extended with new enum members or memory/state corruption leaves an uninitialized status.

Common situations: Custom modifications of the framework adding a new CheckStatus value without updating RefreshCheckInfoStatus; debugging builds that tamper with check state; never seen in stock GameFramework.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.ResourceChecker.cs:195

                    }
                    else if (ci.Status == CheckInfo.CheckStatus.Update)
                    {
                        m_ResourceManager.m_ResourceInfos.Add(ci.ResourceName, new ResourceInfo(ci.ResourceName, ci.FileSystemName, ci.LoadType, ci.Length, ci.HashCode, ci.CompressedLength, false, false));
                        updateCount++;
                        updateTotalLength += ci.Length;
                        updateTotalCompressedLength += ci.CompressedLength;
                        if (ResourceNeedUpdate != null)
                        {
                            ResourceNeedUpdate(ci.ResourceName, ci.FileSystemName, ci.LoadType, ci.Length, ci.HashCode, ci.CompressedLength, ci.CompressedHashCode);
                        }
                    }
                    else if (ci.Status == CheckInfo.CheckStatus.Unavailable || ci.Status == CheckInfo.CheckStatus.Disuse)
                    {
                        // Do nothing.
                    }
                    else
                    {
                        throw new GameFrameworkException(Utility.Text.Format("Check resources '{0}' error with unknown status.", ci.ResourceName.FullName));
                    }

                    if (ci.NeedRemove)
                    {
                        removedCount++;
                        if (ci.ReadWriteUseFileSystem)
                        {
                            IFileSystem fileSystem = m_ResourceManager.GetFileSystem(ci.ReadWriteFileSystemName, false);
                            fileSystem.DeleteFile(ci.ResourceName.FullName);
                        }
                        else
                        {
                            string resourcePath = Utility.Path.GetRegularPath(Path.Combine(m_ResourceManager.m_ReadWritePath, ci.ResourceName.FullName));
                            if (File.Exists(resourcePath))
                            {
                                File.Delete(resourcePath);
                            }
                        }

View on GitHub (pinned to d0c010b051)