Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,21 @@ If you're using expo, you're done. The built-in expo plugin will handle the rest
```javascript
<string name="game_view_content_description">Game view</string>
```

5. Optional (Unity 6 Only) to `node_modules/@azesmway/react-native-unity/android/src/main/java/<your/package/path>/UPlayer.java`

***Inside the UPlayer class, find the method named requestFrame() and replace its contents with the following implementation:***
```Java
public FrameLayout requestFrame() throws NoSuchMethodException {
try {
Method getFrameLayout = unityPlayer.getClass().getMethod("getFrameLayout");
return (FrameLayout) getFrameLayout.invoke(unityPlayer);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
// For Unity 6 compatibility, replace unityPlayer reference with null
return null;
}
}
```

# Known issues

- Does not work on the iOS simulator.
Expand Down