EllanJiang/GameFramework · error · GameFrameworkException

UI group ' ' is not exist.

Error message

UI group '{0}' is not exist.

What it means

OpenUIForm looks up the target UI group by name after validating it; if GetUIGroup returns null — the group was never created with AddUIGroup — the framework throws this formatted GameFrameworkException naming the missing group.

Solutions

  1. Register the group before opening forms: uiManager.AddUIGroup("Default", ...);
  2. Verify the group name string exactly matches the one passed to AddUIGroup (watch case and whitespace)
  3. Ensure the same UIManager instance is used for AddUIGroup and OpenUIForm

Example fix

// before
uiManager.OpenUIForm("Shop", "ShopGroup"); // never added
// after
if (uiManager.GetUIGroup("ShopGroup") == null)
    uiManager.AddUIGroup("ShopGroup", groupDepthHelper);
uiManager.OpenUIForm("Shop", "ShopGroup");
Defensive patterns

Strategy: validation

Validate before calling

if (uiManager.GetUIGroup(uiGroupName) == null)
{
    Log.Error($"UI group '{uiGroupName}' does not exist; add it before opening forms");
    return;
}

Type guard

bool GroupExists(UIManager m, string name) => m.GetUIGroup(name) != null;

Try / catch

try { uiManager.OpenUIForm(assetName, groupName); }
catch (GameFrameworkException ex) when (ex.Message.Contains("is not exist"))
{ Log.Error($"Unknown UI group: {ex.Message}"); }

Prevention

When it happens

Trigger: Calling OpenUIForm with a group name that has no matching UIGroup, e.g. typo in the name, group registered on a different UIManager/UIComponent, or group added after the open call.

Common situations: Renaming groups in config but not in code, multiple UIComponents each with their own groups, forgetting AddUIGroup in a new scene's bootstrap, or case-sensitive name mismatches.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at GameFramework/UI/UIManager.cs:748

            if (m_UIFormHelper == null)
            {
                throw new GameFrameworkException("You must set UI form helper first.");
            }

            if (string.IsNullOrEmpty(uiFormAssetName))
            {
                throw new GameFrameworkException("UI form asset name is invalid.");
            }

            if (string.IsNullOrEmpty(uiGroupName))
            {
                throw new GameFrameworkException("UI group name is invalid.");
            }

            UIGroup uiGroup = (UIGroup)GetUIGroup(uiGroupName);
            if (uiGroup == null)
            {
                throw new GameFrameworkException(Utility.Text.Format("UI group '{0}' is not exist.", uiGroupName));
            }

            int serialId = ++m_Serial;
            UIFormInstanceObject uiFormInstanceObject = m_InstancePool.Spawn(uiFormAssetName);
            if (uiFormInstanceObject == null)
            {
                m_UIFormsBeingLoaded.Add(serialId, uiFormAssetName);
                m_ResourceManager.LoadAsset(uiFormAssetName, priority, m_LoadAssetCallbacks, OpenUIFormInfo.Create(serialId, uiGroup, pauseCoveredUIForm, userData));
            }
            else
            {
                InternalOpenUIForm(serialId, uiFormAssetName, uiGroup, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData);
            }

            return serialId;
        }

        /// <summary>

View on GitHub (pinned to d0c010b051)