From 07b54ee18e407b40e576955e7613fc3088e9b4db Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Wed, 11 Jan 2023 11:48:10 +0100 Subject: [PATCH] [unity] Build compile error after commit 01b8c06 due to unguarded using UnityEditor.namespace. Closes #2222. --- .../Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs | 4 +++- .../Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs index db36aaf91..1824fff40 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonMecanim.cs @@ -28,8 +28,10 @@ *****************************************************************************/ using System.Collections.Generic; -using UnityEditor.Animations; using UnityEngine; +#if UNITY_EDITOR +using UnityEditor.Animations; +#endif namespace Spine.Unity { [RequireComponent(typeof(Animator))] diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs index 0c4d3c282..87e3c9c8c 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonRenderer.cs @@ -51,8 +51,10 @@ #define SPINE_OPTIONAL_MATERIALOVERRIDE using System.Collections.Generic; -using UnityEditor.SceneManagement; using UnityEngine; +#if UNITY_EDITOR +using UnityEditor.SceneManagement; +#endif namespace Spine.Unity { /// Base class of animated Spine skeleton components. This component manages and renders a skeleton.