Initial commit: Unity WordConnect project
This commit is contained in:
23
Assets/Plugins/iOS/HapticFeedback.mm
Normal file
23
Assets/Plugins/iOS/HapticFeedback.mm
Normal file
@ -0,0 +1,23 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
extern "C" void _TriggerHapticFeedback(int force) {
|
||||
UIImpactFeedbackStyle style = UIImpactFeedbackStyleMedium;
|
||||
switch (force) {
|
||||
case 0:
|
||||
style = UIImpactFeedbackStyleLight;
|
||||
break;
|
||||
case 1:
|
||||
style = UIImpactFeedbackStyleMedium;
|
||||
break;
|
||||
case 2:
|
||||
style = UIImpactFeedbackStyleHeavy;
|
||||
break;
|
||||
default:
|
||||
style = UIImpactFeedbackStyleMedium;
|
||||
break;
|
||||
}
|
||||
|
||||
UIImpactFeedbackGenerator *generator = [[UIImpactFeedbackGenerator alloc] initWithStyle:style];
|
||||
[generator prepare];
|
||||
[generator impactOccurred];
|
||||
}
|
||||
33
Assets/Plugins/iOS/HapticFeedback.mm.meta
Normal file
33
Assets/Plugins/iOS/HapticFeedback.mm.meta
Normal file
@ -0,0 +1,33 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30cc81651d3a475abd96c3e551db242
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user