diff --git a/Scripts/Editor/PropertyDrawers/AnimatorParamPropertyDrawer.cs b/Scripts/Editor/PropertyDrawers/AnimatorParamPropertyDrawer.cs index 080b1bc8..0320d5cb 100644 --- a/Scripts/Editor/PropertyDrawers/AnimatorParamPropertyDrawer.cs +++ b/Scripts/Editor/PropertyDrawers/AnimatorParamPropertyDrawer.cs @@ -138,6 +138,13 @@ private static AnimatorController GetAnimatorController(SerializedProperty prope if (animator != null) { AnimatorController animatorController = animator.runtimeAnimatorController as AnimatorController; + + // [PATCH] Allow AnimatorOverrideController to be used with the AnimatorParam attribute. + if (!animatorController && animator.runtimeAnimatorController is AnimatorOverrideController animatorOverrideController) + { + animatorController = animatorOverrideController.runtimeAnimatorController as AnimatorController; + } + return animatorController; } } @@ -150,6 +157,13 @@ private static AnimatorController GetAnimatorController(SerializedProperty prope if (animator != null) { AnimatorController animatorController = animator.runtimeAnimatorController as AnimatorController; + + // [PATCH] Allow AnimatorOverrideController to be used with the AnimatorParam attribute. + if (!animatorController && animator.runtimeAnimatorController is AnimatorOverrideController animatorOverrideController) + { + animatorController = animatorOverrideController.runtimeAnimatorController as AnimatorController; + } + return animatorController; } } @@ -163,6 +177,13 @@ private static AnimatorController GetAnimatorController(SerializedProperty prope if (animator != null) { AnimatorController animatorController = animator.runtimeAnimatorController as AnimatorController; + + // [PATCH] Allow AnimatorOverrideController to be used with the AnimatorParam attribute. + if (!animatorController && animator.runtimeAnimatorController is AnimatorOverrideController animatorOverrideController) + { + animatorController = animatorOverrideController.runtimeAnimatorController as AnimatorController; + } + return animatorController; } }