Skip to content

Commit e1a0296

Browse files
committed
small fix
1 parent 393f490 commit e1a0296

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public class ButtonBehavior : MonoBehaviour
5454
7. Add `Unity-iPhone.xcodeproj` to your XCode: `File` -> `Add Files to [project_name]...` -> `[project_root]/unity/builds/ios/Unity-iPhone.xcodeproj`
5555
8. Add `UnityFramework.framework` to `Frameworks, Libraries, and Embedded Content`
5656

57+
### Android
58+
Under development...
59+
5760
### Usage
5861

5962
```js

example/src/Main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { Button, View, Text } from 'react-native';
33

4-
const Main = ({ navigation }) => {
4+
const Main = ({ navigation }: any) => {
55
return (
66
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
77
<Text>Unity Screen</Text>

example/src/Unity.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const Unity = () => {
1818
useEffect(() => {
1919
setTimeout(() => {
2020
if (unityRef && unityRef.current) {
21+
// @ts-ignore
2122
unityRef.current.postMessage(
2223
message.gameObject,
2324
message.methodName,
@@ -29,6 +30,7 @@ const Unity = () => {
2930

3031
return (
3132
<UnityView
33+
// @ts-ignore
3234
ref={unityRef}
3335
style={{ flex: 1 }}
3436
onUnityMessage={(result) =>

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"keywords": [
3636
"react-native",
3737
"ios",
38-
"android"
38+
"android",
39+
"unity"
3940
],
4041
"repository": "https://github.com/azesmway/react-native-unity",
4142
"author": "azesm <[email protected]> (https://github.com/azesmway)",

0 commit comments

Comments
 (0)