public virtual void Draw() { if (enabled) { parentPanel.Draw(); } }
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; }