From 804605972b0fd0cdbabe72302229f6b9ea52648b Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 26 Feb 2024 18:42:33 +0100 Subject: [PATCH] [unity] Hiding properties of SkeletonSubmeshGraphic in Inspector since they are controlled by parent SkeletonGraphic. --- .../SkeletonSubmeshGraphicInspector.cs | 43 +++++++++++++++++++ .../SkeletonSubmeshGraphicInspector.cs.meta | 11 +++++ spine-unity/Assets/Spine/package.json | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs create mode 100644 spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs.meta diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs new file mode 100644 index 0000000000..a4a1cd9503 --- /dev/null +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs @@ -0,0 +1,43 @@ +/****************************************************************************** + * Spine Runtimes License Agreement + * Last updated July 28, 2023. Replaces all prior versions. + * + * Copyright (c) 2013-2024, Esoteric Software LLC + * + * Integration of the Spine Runtimes into software or otherwise creating + * derivative works of the Spine Runtimes is permitted under the terms and + * conditions of Section 2 of the Spine Editor License Agreement: + * http://esotericsoftware.com/spine-editor-license + * + * Otherwise, it is permitted to integrate the Spine Runtimes into software or + * otherwise create derivative works of the Spine Runtimes (collectively, + * "Products"), provided that each user of the Products must obtain their own + * Spine Editor license and redistribution of the Products in any form must + * include this license and copyright notice. + * + * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, + * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE + * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +using UnityEditor; + +namespace Spine.Unity.Editor { + using Icons = SpineEditorUtilities.Icons; + + [CustomEditor(typeof(SkeletonSubmeshGraphic))] + [CanEditMultipleObjects] + public class SkeletonGraphicSubmeshInspector : UnityEditor.Editor { + + public override void OnInspectorGUI () { + EditorGUILayout.HelpBox("This component is manged by the parent SkeletonGraphic component.", MessageType.None); + } + } +} diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs.meta b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs.meta new file mode 100644 index 0000000000..aa9fcb6220 --- /dev/null +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonSubmeshGraphicInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1bc35530b2335ef4da1dafa6214b6ccd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/spine-unity/Assets/Spine/package.json b/spine-unity/Assets/Spine/package.json index bc10d38286..22e6a9449f 100644 --- a/spine-unity/Assets/Spine/package.json +++ b/spine-unity/Assets/Spine/package.json @@ -2,7 +2,7 @@ "name": "com.esotericsoftware.spine.spine-unity", "displayName": "spine-unity Runtime", "description": "This plugin provides the spine-unity runtime core.", - "version": "4.1.36", + "version": "4.1.37", "unity": "2018.3", "author": { "name": "Esoteric Software",