1
- using UnityEditor . Animations ;
2
- using UnityEngine ;
1
+ using UnityEngine ;
3
2
4
3
namespace NaughtyAttributes . Test
5
4
{
6
5
public class AnimatorParamTest : MonoBehaviour
7
6
{
8
7
public Animator animator0 ;
9
8
10
- public AnimatorController animatorController0 ;
9
+ #if UNITY_EDITOR
10
+ public UnityEditor . Animations . AnimatorController animatorController0 ;
11
+ #endif
11
12
12
13
[ AnimatorParam ( "animator0" ) ]
13
14
public int hash0 ;
@@ -39,11 +40,16 @@ private void TestLog()
39
40
public class AnimatorParamNest1
40
41
{
41
42
public Animator animator1 ;
42
- public AnimatorController animatorController1 ;
43
-
43
+
44
+ #if UNITY_EDITOR
45
+ public UnityEditor . Animations . AnimatorController animatorController1 ;
46
+ #endif
47
+
44
48
private Animator Animator1 => animator1 ;
45
49
46
- private AnimatorController AnimatorController1 => animatorController1 ;
50
+ #if UNITY_EDITOR
51
+ private UnityEditor . Animations . AnimatorController AnimatorController1 => animatorController1 ;
52
+ #endif
47
53
48
54
[ AnimatorParam ( "Animator1" , AnimatorControllerParameterType . Bool ) ]
49
55
public int hash1 ;
@@ -64,12 +70,17 @@ public class AnimatorParamNest1
64
70
public class AnimatorParamNest2
65
71
{
66
72
public Animator animator2 ;
67
- public AnimatorController animatorController2 ;
68
-
73
+
74
+ #if UNITY_EDITOR
75
+ public UnityEditor . Animations . AnimatorController animatorController2 ;
76
+ #endif
77
+
69
78
private Animator GetAnimator2 ( ) => animator2 ;
70
79
71
- private AnimatorController GetAnimatorController2 ( ) => animatorController2 ;
72
-
80
+ #if UNITY_EDITOR
81
+ private UnityEditor . Animations . AnimatorController GetAnimatorController2 ( ) => animatorController2 ;
82
+ #endif
83
+
73
84
[ AnimatorParam ( "GetAnimator2" , AnimatorControllerParameterType . Int ) ]
74
85
public int hash1 ;
75
86
0 commit comments