EllanJiang/GameFramework · error · GameFrameworkException

There are already some resources being updated while…

Error message

There are already some resources being updated while playing.

What it means

ApplyResources throws this when there are pending while-playing resource updates (m_UpdateWaitingInfoWhilePlaying non-empty). Queued resource downloads that trigger during gameplay would conflict with applying a resource pack, so the manager rejects the call.

Solutions

  1. Wait until all while-playing updates finish (no pending download requests) before applying the pack
  2. Apply resource packs before starting gameplay/scene loads that enqueue while-playing updates
  3. Check the ResourceManager update state / pending counts before calling ApplyResources

Example fix

// before
LoadScene("Battle");           // queues while-playing updates
resourceManager.ApplyResources(packPath); // throws
// after
resourceManager.ApplyResources(packPath); // apply first
// then load scenes once apply-success callback fires
LoadScene("Battle");
Defensive patterns

Strategy: try-catch

Validate before calling

// ensure no while-playing updates are pending before applying
if (m_PendingWhilePlayingUpdates) return;

Try / catch

try { resourceManager.ApplyResources(packPath); } catch (GameFrameworkException ex) { Log.Warn("While-playing updates pending: " + ex.Message); }

Prevention

When it happens

Trigger: Calling ApplyResources while resources are queued for download during play (e.g. a scene load requested assets that entered the while-playing update queue); applying a pack immediately after triggering scene loads.

Common situations: Hot-update flows that both download missing resources during play and apply a local pack; loading a scene on startup before applying the pack that contains its resources.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


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

Appendix: source

Thrown at GameFramework/Resource/ResourceManager.ResourceUpdater.cs:335

            {
                if (!m_CheckResourcesComplete)
                {
                    throw new GameFrameworkException("You must check resources complete first.");
                }

                if (m_ApplyingResourcePackStream != null)
                {
                    throw new GameFrameworkException(Utility.Text.Format("There is already a resource pack '{0}' being applied.", m_ApplyingResourcePackPath));
                }

                if (m_UpdatingResourceGroup != null)
                {
                    throw new GameFrameworkException(Utility.Text.Format("There is already a resource group '{0}' being updated.", m_UpdatingResourceGroup.Name));
                }

                if (m_UpdateWaitingInfoWhilePlaying.Count > 0)
                {
                    throw new GameFrameworkException("There are already some resources being updated while playing.");
                }

                try
                {
                    long length = 0L;
                    ResourcePackVersionList versionList = default(ResourcePackVersionList);
                    using (FileStream fileStream = new FileStream(resourcePackPath, FileMode.Open, FileAccess.Read))
                    {
                        length = fileStream.Length;
                        versionList = m_ResourceManager.m_ResourcePackVersionListSerializer.Deserialize(fileStream);
                    }

                    if (!versionList.IsValid)
                    {
                        throw new GameFrameworkException("Deserialize resource pack version list failure.");
                    }

                    if (versionList.Offset + versionList.Length != length)

View on GitHub (pinned to d0c010b051)