From 76340b481b1f9e461787cf6e5f22186cf733c4f8 Mon Sep 17 00:00:00 2001 From: in0finite Date: Fri, 30 Aug 2019 17:38:12 +0200 Subject: [PATCH] UIManager provides onGUI event --- Assets/Scripts/Behaviours/UIManager.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/Scripts/Behaviours/UIManager.cs b/Assets/Scripts/Behaviours/UIManager.cs index badae0da..cda10818 100644 --- a/Assets/Scripts/Behaviours/UIManager.cs +++ b/Assets/Scripts/Behaviours/UIManager.cs @@ -38,6 +38,8 @@ namespace SanAndreasUnity.Behaviours [SerializeField] float m_scrollbarSizeMultiplierOnMobile = 2f; [SerializeField] bool m_changeScrollbarSizeInEditor = false; + public static event System.Action onGUI = delegate {}; + // note: UIManager's OnGUI() should execute before other OnGUI()s, because other scripts may try to create their own // style from existing styles @@ -80,6 +82,8 @@ namespace SanAndreasUnity.Behaviours SetStylesFontSize(m_imguiFontSize); } + onGUI(); + } void SetupGui()