File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ public static class HapticFeedback
99 public static void LightFeedback ( )
1010 {
1111
12- #if UNITY_IPHONE
12+ #if UNITY_IPHONE && ! UNITY_EDITOR
1313 iOS . HapticFeedback . IOSUIImpactFeedbackGenerator ( "light" ) ;
14- #elif UNITY_ANDROID
14+ #elif UNITY_ANDROID && ! UNITY_EDITOR
1515 Android . HapticFeedback . PerformHapticFeedback ( Android . HapticFeedbackConstants . CONTEXT_CLICK ) ;
1616#endif
1717
@@ -20,9 +20,9 @@ public static void LightFeedback()
2020 public static void MediumFeedback ( )
2121 {
2222
23- #if UNITY_IPHONE
23+ #if UNITY_IPHONE && ! UNITY_EDITOR
2424 iOS . HapticFeedback . IOSUIImpactFeedbackGenerator ( "medium" ) ;
25- #elif UNITY_ANDROID
25+ #elif UNITY_ANDROID && ! UNITY_EDITOR
2626 Android . HapticFeedback . PerformHapticFeedback ( Android . HapticFeedbackConstants . VIRTUAL_KEY ) ;
2727#endif
2828
@@ -31,9 +31,9 @@ public static void MediumFeedback()
3131 public static void HeavyFeedback ( )
3232 {
3333
34- #if UNITY_IPHONE
34+ #if UNITY_IPHONE && ! UNITY_EDITOR
3535 iOS . HapticFeedback . IOSUIImpactFeedbackGenerator ( "heavy" ) ;
36- #elif UNITY_ANDROID
36+ #elif UNITY_ANDROID && ! UNITY_EDITOR
3737 Android . HapticFeedback . PerformHapticFeedback ( Android . HapticFeedbackConstants . LONG_PRESS ) ;
3838#endif
3939
You can’t perform that action at this time.
0 commit comments