From 381c23b5fc34d97cc5fd8fd243ad6680df0487ea Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Tue, 7 Apr 2020 21:24:26 +0200 Subject: [PATCH] [unity] Fixed some Inspector buttons being displayed without border in Unity 2019.3. GuiStyle.Name was the problem. Fixes #1654. --- .../Editor/Components/BoundingBoxFollowerInspector.cs | 2 +- .../Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs | 3 +-- .../Editor/SkeletonRenderSeparatorInspector.cs | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs index f63010b09..260a90150 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/BoundingBoxFollowerInspector.cs @@ -87,7 +87,7 @@ namespace Spine.Unity.Editor { using (new EditorGUILayout.VerticalScope(EditorStyles.helpBox)) { EditorGUILayout.HelpBox("It's ideal to add BoundingBoxFollower to a separate child GameObject of the Spine GameObject.", MessageType.Warning); - if (GUILayout.Button(new GUIContent("Move BoundingBoxFollower to new GameObject", Icons.boundingBox), GUILayout.Height(50f))) { + if (GUILayout.Button(new GUIContent("Move BoundingBoxFollower to new GameObject", Icons.boundingBox), GUILayout.Height(30f))) { AddBoundingBoxFollowerChild(skeletonRendererValue, follower); DestroyImmediate(follower); return; diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs index 24b6af729..7842686c1 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineInspectorUtility.cs @@ -220,13 +220,12 @@ namespace Spine.Unity.Editor { #region Button const float CenterButtonMaxWidth = 270f; - const float CenterButtonHeight = 35f; + const float CenterButtonHeight = 30f; static GUIStyle spineButtonStyle; static GUIStyle SpineButtonStyle { get { if (spineButtonStyle == null) { spineButtonStyle = new GUIStyle(GUI.skin.button); - spineButtonStyle.name = "Spine Button"; spineButtonStyle.padding = new RectOffset(10, 10, 10, 10); } return spineButtonStyle; diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs index 1662b7ae0..9c5fd1bf0 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Modules/SkeletonRenderSeparator/Editor/SkeletonRenderSeparatorInspector.cs @@ -182,7 +182,7 @@ namespace Spine.Unity.Examples { if (component.enabled && component.SkeletonRenderer != null && extraRenderersNeeded > 0) { EditorGUILayout.HelpBox(string.Format("Insufficient parts renderers. Some parts will not be rendered."), MessageType.Warning); string addMissingLabel = string.Format("Add the missing renderer{1} ({0}) ", extraRenderersNeeded, SpineInspectorUtility.PluralThenS(extraRenderersNeeded)); - if (GUILayout.Button(addMissingLabel, GUILayout.Height(40f))) { + if (GUILayout.Button(addMissingLabel, GUILayout.Height(30f))) { AddPartsRenderer(extraRenderersNeeded); DetectOrphanedPartsRenderers(component); partsRendererInitRequired = true;