@dolami-inc/react-native-expo-unity 0.1.10 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -73,20 +73,38 @@ cp node_modules/@dolami-inc/react-native-expo-unity/plugin/NativeCallProxy.mm <U
73
73
 
74
74
  ### 2. Unity project — build iOS
75
75
 
76
+ > 📹 **Video guide** (click to play):
77
+ >
78
+ > [![Xcode export settings](xcode-settings-thumb.jpg)](xcode-settings.mp4)
79
+
76
80
  1. Unity → File → Build Settings → iOS → Build
77
81
  2. Open generated Xcode project
78
82
  3. Select `NativeCallProxy.h` in Libraries/Plugins/iOS/
79
83
  4. Set Target Membership → `UnityFramework` → **Public**
80
- 5. Build `UnityFramework` scheme
84
+ 5. **Select the `Data` folder** in the Project Navigator
85
+ 6. In the right panel under **Target Membership**, check **`UnityFramework`** ✅
86
+ > ⚠️ **This is critical.** Without this, the `Data` folder (which contains `global-metadata.dat` and all Unity assets) will NOT be included inside `UnityFramework.framework`. The app will crash at launch with: `Could not open .../global-metadata.dat — IL2CPP initialization failed`
87
+ 7. Build `UnityFramework` scheme
81
88
 
82
89
  ### 3. Copy build artifacts to your RN project
83
90
 
84
- Create `unity/builds/ios/` in your project root and copy all artifacts from your Unity iOS build:
91
+ Create `unity/builds/ios/` in your project root and copy the built framework and static libraries:
85
92
 
86
93
  ```bash
87
94
  mkdir -p unity/builds/ios
88
- cp -R <unity-build>/UnityFramework.framework unity/builds/ios/
89
- cp <unity-build>/*.a unity/builds/ios/
95
+
96
+ # Copy the compiled framework (should already contain Data/ inside after step 2.6)
97
+ cp -R <xcode-build-output>/UnityFramework.framework unity/builds/ios/
98
+
99
+ # Copy static libraries from the Unity Xcode project root
100
+ cp <unity-xcode-project>/*.a unity/builds/ios/
101
+ ```
102
+
103
+ Verify that `Data/` exists inside the framework:
104
+
105
+ ```bash
106
+ ls unity/builds/ios/UnityFramework.framework/Data
107
+ # Should show: Managed/ Resources/ etc.
90
108
  ```
91
109
 
92
110
  The podspec references these files **directly by path** — nothing is copied or embedded into the npm package. Updating your Unity build is as simple as replacing the contents of `unity/builds/ios/` and re-running `pod install`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dolami-inc/react-native-expo-unity",
3
- "version": "0.1.10",
3
+ "version": "0.2.0",
4
4
  "description": "Unity as a Library (UaaL) bridge for React Native / Expo",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",