f111fei / react-native-unity-demo

103 stars 80 forks source link

Fix Vuforia Dataset Loading #16

Open mtsdnz opened 6 years ago

mtsdnz commented 6 years ago

As mentioned on issue f111fei/react-native-unity-view#20, when we try to use a project with Vuforia on iOS, the Vuforia Dataset isn't being loaded:

Dataset Foo could not be loaded and cannot be activated.

Because of this, the recognition doesn't work.

We can fix it simple dragging the Data/Raw/Vuforia folder from the UnityExport directory to the UnityExport group in Xcode, selecting Create folder references.

I've changed the XCodePostBuild.cs file to check if the Vuforia folder exists in the Data/Raw directory, and if it exists, we create a reference of it on UnityExport folder.

This fixes the issue.

f111fei commented 6 years ago

The demo is only an Cube project. So your PR may not be merged. But I think it's going to be useful for people who use Vuforia. Thank you.

mtsdnz commented 6 years ago

I've created the pull request here because on README of the react-native-unity-view you reference the XCodePostBuild.cs from here