react-native-unity-view | Show an unity view in react | Frontend Framework library
kandi X-RAY | react-native-unity-view Summary
kandi X-RAY | react-native-unity-view Summary
Show an unity view in react native
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create new view instance
- Adds the unity view to the group
- Add the single unity view to the background
- Create a singleton player
- Resume host resume
- Restore the UI user state
- Is the unit paused?
- Resume execution
- Resume the UI
- Pauses host pause
- Returns true if the UI is ready to be unified
- Emits a device - side message
- Checks if the Minecraft is ready
- Pauses the playback
- Posts a message to a player
- Adds an event listener to the system
- Called when a host is destroyed
- Removes an event listener from the system
- Set configuration changed
- Send a unified message
- Creates a list of view managers
- Create a native module
- Create a new Minecraft player
- This is called when a view instance is deleted
- Called when the window focus changed
- Called when view is attached to a window
react-native-unity-view Key Features
react-native-unity-view Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-unity-view
QUESTION
I'm a React Native noob.
I just integrated my Unity3D app with the React Native app using nreact-native-unity-view
(https://github.com/nhancv/nreact-native-unity-view)
ANSWER
Answered 2020-Oct-11 at 18:07The easiest way is to use the stack navigator and have a separate page for the unity screen. https://reactnavigation.org/docs/stack-navigator/
the code to navigate would be navigation.navigate('screenname'); This code wont work until you sort the imports related to unity and related items.
QUESTION
We have a ReactNative application that has integrated Unity based on react-native-unity-view successfully as a library for quite a long time. However, after most recent updates on ReactNative regarding AndroidX and latest SDK-changes, we're running into the issue "libmain.so not found". This exception happens on the very first attempt to display a Unity-View.
There is a similar issue on SO, please don't mark as duplicate as our approach might be different and particulary since we give many many more details here.
There is a running and still working example on GitHub (based on ReactNative 0.57): https://github.com/f111fei/react-native-unity-demo. As long as this project is based on ReactNative 0.57 and its appropriate gradle-settings, everything works fine. But as soon as we upgrade to the latest ReactNative version (and even 0.60 for example), which gives us an android-folder that is very different against to the older one), the issue happens with a crash of the application. (We also tried to set up everything from scratch to exclude the possibility that this issue was due to upgrades. With RN 0.57 everything still works fine, with RN 0.60 and above not)
The exception is as follows:
...ANSWER
Answered 2019-Nov-21 at 16:33I can answer by myself now. The issue was caused by Unity export that was not ARM64-compatible unless several settings were applied manually. Here is how:
Bevor building for Android, we need to adjust some settings in "Player Settings" in order to make ARM64 available:
- Switching "Scripting Backend" from Mono to ILCPP, which enables us to:
- Select "ARM64" under Target Architectures
If you run into an Error like "NDK not found" while building, ensure that Unity has downloaded and installed its own copy of NDK:
Having all this in mind will enable us to link against these libraries without failing to find "libmain.so".
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-unity-view
Make alterations to the following files:. Do not run in the simulator.
android/settings.gradle
Open your react native project in XCode.
Copy File UnityConfig.xcconfig to ios/${XcodeProjectName}/.
Drag UnityConfig.xcconfig to XCode. Choose Create folder references.
Setting .xcconfig to project.
Go to Targets => Build Settings. Change Dead Code Stripping to YES.
Modify main.m
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page