public async Task <Widget> CreateInstance(IUIStack manager, string name, UIMessage message) { var loader = Her.Resolve <IViewLoader>(); var prefab = await loader.LoadView(name); if (prefab == null) { throw new Exception($"Load view: {name} failed"); } var instance = Object.Instantiate(prefab).GetComponent <Widget>(); instance.SetManagerInfo(name, manager, message); return(instance); }
private void Start() { _viewManager = Her.Resolve <IViewManager>(); }
public virtual void CleanUpViewInfo() { Her.Resolve <IViewManager>().UnRegister(ViewId); }
public virtual void SetUpViewInfo() { ViewId = Her.Resolve <IViewManager>().Register(this); }