Exemplo n.º 1
0
 void OnGUI()
 {
     if (Skin == null)
     {
         Skin = StyleConverter.Convert(GUI.skin);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Get Unity skin - only accessible in OnGUI
        /// </summary>
        void OnGUI()
        {
            if (GamePaused && !ShowUI)
            {
                return;
            }

            if (CommonWindowProperties.UnitySkin == null)
            {
                CommonWindowProperties.UnitySkin = StyleConverter.Convert(GUI.skin);

                // Load Unity skin, if it was saved in the config
                if (Configuration.Skin == 1)
                {
                    CommonWindowProperties.ActiveSkin = CommonWindowProperties.UnitySkin;
                    CommonWindowProperties.RefreshStyles();
                }
            }
        }