From 797d786817f1db197c1e4078fc39f6bafc9b8d24 Mon Sep 17 00:00:00 2001 From: poi-vrc <77053052+poi-vrc@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:02:18 +0800 Subject: [PATCH] fix: unable to upload since editor using are used --- Editor/Passes/Animations/ManipulateAnimatorPass.cs | 6 +++++- Runtime/Components/Animations/DTManipulateAnimator.cs | 9 ++++----- package.json | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Editor/Passes/Animations/ManipulateAnimatorPass.cs b/Editor/Passes/Animations/ManipulateAnimatorPass.cs index 8dffe5f4..02c8be42 100644 --- a/Editor/Passes/Animations/ManipulateAnimatorPass.cs +++ b/Editor/Passes/Animations/ManipulateAnimatorPass.cs @@ -166,7 +166,11 @@ private static bool TryGetSourceController(Transform avatarRoot, DTManipulateAni { relativeRoot = avatarRoot; } - controller = comp.SourceController; + if (!(comp.SourceController is AnimatorController animCtrl)) + { + return false; + } + controller = animCtrl; return true; } else if (comp.SourceType == DTManipulateAnimator.SourceTypes.Animator) diff --git a/Runtime/Components/Animations/DTManipulateAnimator.cs b/Runtime/Components/Animations/DTManipulateAnimator.cs index 85dabb2d..98e140d4 100644 --- a/Runtime/Components/Animations/DTManipulateAnimator.cs +++ b/Runtime/Components/Animations/DTManipulateAnimator.cs @@ -10,7 +10,6 @@ * You should have received a copy of the GNU General Public License along with DressingTools. If not, see . */ -using UnityEditor.Animations; using UnityEngine; namespace Chocopoi.DressingTools.Components.Animations @@ -59,7 +58,7 @@ public enum ManipulateModes public VRC.SDK3.Avatars.Components.VRCAvatarDescriptor.AnimLayerType VRCTargetLayer { get => m_VRCTargetLayer; set => m_VRCTargetLayer = value; } #endif public Animator TargetAnimator { get => m_TargetAnimator; set => m_TargetAnimator = value; } - public AnimatorController TargetController { get => m_TargetController; set => m_TargetController = value; } + public RuntimeAnimatorController TargetController { get => m_TargetController; set => m_TargetController = value; } public PathModes PathMode { get => m_PathMode; set => m_PathMode = value; } public ManipulateModes ManipulateMode { get => m_ManipulateMode; set => m_ManipulateMode = value; } public SourceTypes SourceType { get => m_SourceType; set => m_SourceType = value; } @@ -69,7 +68,7 @@ public enum ManipulateModes /// ignored and the animator root will be used. /// public Transform SourceRelativeRoot { get => m_SourceRelativeRoot; set => m_SourceRelativeRoot = value; } - public AnimatorController SourceController { get => m_SourceController; set => m_SourceController = value; } + public RuntimeAnimatorController SourceController { get => m_SourceController; set => m_SourceController = value; } public Animator SourceAnimator { get => m_SourceAnimator; set => m_SourceAnimator = value; } public bool RemoveSourceAnimator { get => m_RemoveSourceAnimator; set => m_RemoveSourceAnimator = value; } public bool MatchTargetWriteDefaults { get => m_MatchTargetWriteDefaults; set => m_MatchTargetWriteDefaults = value; } @@ -81,12 +80,12 @@ public enum ManipulateModes [SerializeField] private int m_VRCTargetLayer; #endif [SerializeField] private Animator m_TargetAnimator; - [SerializeField] private AnimatorController m_TargetController; + [SerializeField] private RuntimeAnimatorController m_TargetController; [SerializeField] private PathModes m_PathMode; [SerializeField] private ManipulateModes m_ManipulateMode; [SerializeField] private SourceTypes m_SourceType; [SerializeField] private Transform m_SourceRelativeRoot; - [SerializeField] private AnimatorController m_SourceController; + [SerializeField] private RuntimeAnimatorController m_SourceController; [SerializeField] private Animator m_SourceAnimator; [SerializeField] private bool m_RemoveSourceAnimator; [SerializeField] private bool m_MatchTargetWriteDefaults; diff --git a/package.json b/package.json index 00da993d..b854aecc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.chocopoi.vrc.dressingtools", "displayName": "DressingTools", - "version": "2.5.0-beta.1", + "version": "2.5.0-beta.2", "unity": "2019.4", "description": "A simple but advanced, non-destructive cabinet system.", "author": {