Exemplo n.º 1
0
 public virtual void Draw()
 {
     if (enabled)
     {
         parentPanel.Draw();
     }
 }
Exemplo n.º 2
0
        private void OnGUI()
        {
            GUI.depth = 0;

            if (Event.current.type != EventType.Repaint || !EnableCustomStack)
            {
                return;
            }

            RenderTexture oldRt = RenderTexture.active;

            RenderTexture.active = targetTexture;

            if (IsReady())
            {
                // Clear UI
                Clear(clearColor);

                // Draw parent panel
                parentPanel.Draw();
            }

            RenderTexture.active = oldRt;
        }