EllanJiang/GameFramework · error · GameFrameworkException
UI form helper is invalid.
Error message
UI form helper is invalid.
What it means
UIManager.UIFormInstanceObject.Create throws when the uiFormHelper parameter is null. Every UI form instance needs its helper to create, release, and instantiate form assets during pooling and shutdown, so a missing helper makes the instance object unusable.
Solutions
- Set a valid IUIFormHelper on UIManager (e.g. via UIComponent/UnityGameFramework defaults) before opening forms.
- Pass the helper you configured into Create when calling it manually.
- Register the UIFormHelper MonoBehaviour in the scene if using the default pipeline.
Example fix
// before UIComponent.SetUIFormHelper(null); // after UIComponent.SetUIFormHelper(gameObject.AddComponent<UIFormHelper>());
Defensive patterns
Strategy: validation
Validate before calling
if (uiFormHelper == null)
{
Log.Error("UI form helper not configured; call SetUIFormHelper first");
return;
} Try / catch
try { var inst = UIFormInstanceObject.Create(name, asset, uiForm, helper); }
catch (GameFrameworkException ex) { Log.Error(ex, "UI form helper missing"); } Prevention
- Configure IUIFormHelper during UIComponent initialization, before any form work
- Use default UnityGameFramework scene setup which wires helpers automatically
- Assert helper non-null in bootstrap code
When it happens
Trigger: Calling UIFormInstanceObject.Create without a valid IUIFormHelper — usually a custom helper integration that forgot to assign the helper, or the UIManager was built without a UI form helper set.
Common situations: Forgot to call SetUIFormHelper / register the helper component in the Unity scene; custom instantiation code constructed instance objects directly; dependency injection omitted the helper.
Related errors
- UI form asset is invalid.
- UI form is invalid.
- UI group helper is invalid.
- Results is invalid.
- UI form is invalid.
AI-assisted analysis of EllanJiang/GameFramework@d0c010b051 (2026-09-15).
Data as JSON: /api/errors/cd73f0c5f1180993.
Report an issue: GitHub.
Appendix: source
Thrown at GameFramework/UI/UIManager.UIFormInstanceObject.cs:37
private object m_UIFormAsset;
private IUIFormHelper m_UIFormHelper;
public UIFormInstanceObject()
{
m_UIFormAsset = null;
m_UIFormHelper = null;
}
public static UIFormInstanceObject Create(string name, object uiFormAsset, object uiFormInstance, IUIFormHelper uiFormHelper)
{
if (uiFormAsset == null)
{
throw new GameFrameworkException("UI form asset is invalid.");
}
if (uiFormHelper == null)
{
throw new GameFrameworkException("UI form helper is invalid.");
}
UIFormInstanceObject uiFormInstanceObject = ReferencePool.Acquire<UIFormInstanceObject>();
uiFormInstanceObject.Initialize(name, uiFormInstance);
uiFormInstanceObject.m_UIFormAsset = uiFormAsset;
uiFormInstanceObject.m_UIFormHelper = uiFormHelper;
return uiFormInstanceObject;
}
public override void Clear()
{
base.Clear();
m_UIFormAsset = null;
m_UIFormHelper = null;
}
protected internal override void Release(bool isShutdown)
{View on GitHub (pinned to d0c010b051)