react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

A problem when using Nice Vibrations in Unity

Open dmitry-markevich opened this issue 4 years ago • 8 comments

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

dmitry-markevich avatar Mar 04 '21 08:03 dmitry-markevich

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

lukezbihlyj avatar Apr 28 '21 07:04 lukezbihlyj

No, I had to use another asset

dmitry-markevich avatar Apr 28 '21 09:04 dmitry-markevich

Did someone fixed this issue?

MohdAmmarNaeem avatar Aug 09 '22 12:08 MohdAmmarNaeem

Did anyone fixed this?

khorenj avatar Oct 19 '22 20:10 khorenj

I am also getting same issue. can anyone help?

UmeshAmbaliya avatar Aug 02 '23 10:08 UmeshAmbaliya

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

lukezbihlyj avatar Aug 03 '23 16:08 lukezbihlyj

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.

mehmetcanari avatar Dec 12 '23 09:12 mehmetcanari

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

Dsearle2 avatar May 14 '24 10:05 Dsearle2