public override void OnInspectorGUI() { base.OnInspectorGUI(); render = target as HGUIRender; if (GUILayout.Button("Test")) { Test(); } if (GUI.changed) { UIHierarchy.ChangeRoot(render.GetGuid(), render.canvas); } }
public void OnEnable() { render = target as HGUIRender; if (Application.isPlaying) { UIHierarchy.ChangeRoot(render.GetGuid(), render.canvas); } else { if (render.OldUI != null) { render.canvas = render.OldUI.Content; UIHierarchy.ChangeRoot(render.GetGuid(), render.canvas); } } }
public override void OnEnable() { UIHierarchy.ChangeRoot((target as HCanvas).transform); }