swift package generate-xcodeproj --skip-extra-files
xcodebuild -project yourproject.xcodeproj -scheme yourproject-Package -configuration Release -sdk iphoneos CONFIGURATION_BUILD_DIR=.
- Drag the file
yourproject.frameworkin your Unity project underAsset/Plugin/iOS - Enable
Add to Embedded Binaries.
[DllImport("__Internal")]
private static extern void Haptic_StartContinuousHapticEngine();
[DllImport("__Internal")]
private static extern void Haptic_PlayContinuousHaptic(float sharpness, float intensity);
** For more information about sharpness and intensity, please read the document from Apple https://developer.apple.com/documentation/corehaptics
[DllImport("__Internal")]
private static extern void Haptic_StopContinuousHaptic();