asmadsen / react-native-unity-view

MIT License
203 stars 129 forks source link

A problem when using Nice Vibrations in Unity #35

Open dmitry-markevich opened 3 years ago

dmitry-markevich commented 3 years ago

I have just added Nice Vibrations to my Unity project and now I get this error while building the whole React Native + Unity app on rect-native-unity-view compile step:

Module 'UnityFramework_NiceVibrationsPrivate' not found (https://prnt.sc/10cremj)

UnityFramework_NiceVibrationsPrivate is described in module.modulemap file in Nice Vibrations library (https://prnt.sc/10crh5p):

module UnityFramework_NiceVibrationsPrivate { header "UnitySwift-Bridging-Header.h" export * }

It connects swift and Obj-C code:

MMNViOSCoreHapticsInterface.swift -> UnityFramework_NiceVibrationsPrivate -> UnitySwift-Bridging-Header.h:

#import <Foundation/Foundation.h> #import <CoreHaptics/CoreHaptics.h> #import "UnityInterface.h" typedef void (*HapticCallback)();

Nice Vibrations has post process script to add some dependencies when building Xcode project from Unity:

https://prnt.sc/10crmx7 https://prnt.sc/10cro72

Unity Framework compiles OK https://prnt.sc/10crqcr , but has warning:

Umbrella header for module 'UnityFramework' does not include header 'UnitySwift-Bridging-Header.h'

When build comes to react-native-unity-view, I get the error https://prnt.sc/10crsgk

I will be grateful for any help or ideas in solving the problem

lukezbihlyj commented 3 years ago

Did you ever fix this? We're having the same problem and I thought I fixed it before but it broke again randomly

dmitry-markevich commented 3 years ago

No, I had to use another asset

MohdAmmarNaeem commented 2 years ago

Did someone fixed this issue?

khorenj commented 1 year ago

Did anyone fixed this?

UmeshAmbaliya commented 1 year ago

I am also getting same issue. can anyone help?

lukezbihlyj commented 1 year ago

I swapped to this plugin instead: https://github.com/CandyCoded/HapticFeedback

mehmetcanari commented 8 months ago

Here is the solution.

1- Type "MMNV" on project searchbar.

2- Click on "MMNV Path Definition" SO.

Screenshot 2023-12-12 at 12 48 17

3- On inspector you must assign "UnitySwift-Bridging-Header"

Screenshot 2023-12-12 at 12 49 10

That's it. You can build without getting any errors.

Dsearle2 commented 3 months ago

I'm still getting this issue when trying to build despite having UnitySwift-Bridging-Header assigned. Is there a fix for this issue?