Skip to content

Commit 1f522f9

Browse files
committed
change readme
1 parent e67df14 commit 1f522f9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export default Unity;
100100
- `onUnityMessage?: (event: NativeSyntheticEvent)` - receives a message from a Unity
101101

102102
#### Methods
103-
- `postMessage(gameObject, methodName, message)` - sends a message to the unit
103+
- `postMessage(gameObject, methodName, message)` - sends a message to the Unity. **FOR IOS:** The native method of unity is used to send a message
104+
`sendMessageToGOWithName:(const char*)goName functionName:(const char*)name message:(const char*)msg;`, more details can be found in the [documentation](https://docs.unity3d.com/2021.1/Documentation/Manual/UnityasaLibrary-iOS.html)
105+
104106
- `unloadUnity()` - the Unity is unloaded automatically when the react-native component is unmounted, but if you want to unload the Unity, you can call this method
105107

106108
## Contributing

Diff for: ios/ReactNativeUnityViewManager.m

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#import <React/RCTViewManager.h>
33
#import <React/RCTUIManager.h>
44
#import <ReactNativeUnityView.h>
5+
#import <UnityFramework/NativeCallProxy.h>
56

67
@interface ReactNativeUnityViewManager : RCTViewManager
78
@end

0 commit comments

Comments
 (0)