请问创建UI报空是为什么呢
初始函数public void Init()
{
UIPackage.AddPackage("UI/HpComponent/HpComponent");
HpComponentBinder.BindAll();
view = new GComponent();
GRoot.inst.AddChild(view);
}
生成代码
UI_HpComponent comp = UI_HpComponent.CreateInstance();
Debug.Log(comp);
comp.container.fairyBatching = true;
view.AddChild(comp);
hpHUD = comp;
报错信息
NullReferenceException: Object reference not set to an instance of an object
{
UIPackage.AddPackage("UI/HpComponent/HpComponent");
HpComponentBinder.BindAll();
view = new GComponent();
GRoot.inst.AddChild(view);
}
生成代码
UI_HpComponent comp = UI_HpComponent.CreateInstance();
Debug.Log(comp);
comp.container.fairyBatching = true;
view.AddChild(comp);
hpHUD = comp;
报错信息
NullReferenceException: Object reference not set to an instance of an object
没有找到相关结果
已邀请:
1 个回复
谷主
赞同来自: