Example #1
0
 public override void OnInspectorGUI()
 {
     base.OnInspectorGUI();
     render = target as HGUIRender;
     if (GUILayout.Button("Test"))
     {
         Test();
     }
     if (GUI.changed)
     {
         UIHierarchy.ChangeRoot(render.GetGuid(), render.canvas);
     }
 }
Example #2
0
 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);
         }
     }
 }
Example #3
0
 public override void OnEnable()
 {
     UIHierarchy.ChangeRoot((target as HCanvas).transform);
 }