react-native-unity | React Native package to use Unity as library with RN app | Frontend Framework library

 by   wowmaking C# Version: v1.0.0-rc.3 License: No License

kandi X-RAY | react-native-unity Summary

kandi X-RAY | react-native-unity Summary

react-native-unity is a C# library typically used in User Interface, Frontend Framework, React Native, React, Unity applications. react-native-unity has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

React Native package to use Unity as library with RN app
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              react-native-unity has a low active ecosystem.
              It has 73 star(s) with 15 fork(s). There are 9 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 4 open issues and 11 have been closed. On average issues are closed in 728 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of react-native-unity is v1.0.0-rc.3

            kandi-Quality Quality

              react-native-unity has 0 bugs and 10 code smells.

            kandi-Security Security

              react-native-unity has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              react-native-unity code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              react-native-unity does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              react-native-unity releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 236 lines of code, 40 functions and 10 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of react-native-unity
            Get all kandi verified functions for this library.

            react-native-unity Key Features

            No Key Features are available at this moment for react-native-unity.

            react-native-unity Examples and Code Snippets

            @wowmaking/react-native-unity,Getting started,Installation
            C#dot img1Lines of Code : 36dot img1no licencesLicense : No License
            copy iconCopy
            #import 
            +++ #import 
            
            #import "AppDelegate.h"
            
            int main(int argc, char * argv[]) {
              @autoreleasepool {
                +++ [RNUnity setArgc:argc];
                +++ [RNUnity setArgv:argv];
                return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate clas  
            @wowmaking/react-native-unity,Usage
            C#dot img2Lines of Code : 13dot img2no licencesLicense : No License
            copy iconCopy
            import { Unity, UnityResponderView } from '@wowmaking/react-native-unity';
            
            Unity.init();
            
            const App = () => {
              return (
                
                  
                  
                  Unity.execCommand('command_name', { /* any specific command data */ })}>Press ME!
                
              );
            };
              

            Community Discussions

            Trending Discussions on react-native-unity

            QUESTION

            React Native: Invoke a View on Button click
            Asked 2020-Oct-11 at 18:07

            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:07

            The 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.

            Source https://stackoverflow.com/questions/64307308

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install react-native-unity

            IMPORTANT! Call Resolve or Reject method of received RNCommand instance to remove it from JavaScript thread.
            Install package via npm
            Move your Unity project to unity folder at project root
            Add following line at your unity/Packages/manifest.json { ... "com.wowmaking.react-native-unity": "file:../../node_modules/@wowmaking/react-native-unity/unity" }
            To receive commands from JavaScript, you must create another game object, or use existing. Commands receiver object must implements IRNCommandsReceiver interface using Wowmaking.RNU; public class NewGameObject : MonoBehaviour, IRNCommandsReceiver { ... }
            Set your object as commands receiver to RNBridge on Awake using Wowmaking.RNU; public class NewGameObject : MonoBehaviour, IRNCommandsReceiver { private void Awake() { RNBridge.RegisterCommandsReceiver(this); } }
            Implement IRNCommandsReceiver interface by adding HandleCommand method using Wowmaking.RNU; public class NewGameObject : MonoBehaviour, IRNCommandsReceiver { private void Awake() { RNBridge.RegisterCommandsReceiver(this); } public void HandleCommand(RNCommand command) { switch (command.name) { // command.Resolve(new {}) || command.Reject(new {}) } } } IMPORTANT! Call Resolve or Reject method of received RNCommand instance to remove it from JavaScript thread
            Go to Menu -> Edit -> Project setings... -> Player -> iOS -> Other Settings
            Find Target SDK setting and select Simulator SDK
            Run pod install
            Build Unity app to [project_root]/unity/builds/ios
            Add Unity-iPhone.xcodeproj to your workspace: Menu -> File -> Add Files to [workspace_name]... -> [project_root]/unity/builds/ios/Unity-iPhone.xcodeproj
            Add UnityFramework.framework to Embedded Binaries: select your_app target in workspace in General / Embedded Binaries press + select Unity-iPhone/Products/UnityFramework.framework remove UnityFramework.framework from Linked Frameworks and Libraries ( select it and press - ) in Build Phases move Embedded Binaries before Compile Sources ( drag and drop )
            In AppDelegate.m file make background color of React root view transparent
            Add ndk support into android/app/build.gradle defaultConfig { ... ndk { abiFilters "armeabi-v7a", "arm64-v8a" } }
            Append the following lines to android/settings.gradle: include ':unityLibrary' project(':unityLibrary').projectDir=new File('..\\unity\\builds\\android\\unityLibrary')
            Insert the following lines inside the dependencies block in android/app/build.gradle: implementation project(':unityLibrary') implementation files("${project(':unityLibrary').projectDir}/libs/unity-classes.jar")
            Change parent activity in MainActivity.java from ReactActivity to UnityReactActivity import com.wowmaking.rnunity.UnityReactActivity; public class MainActivity extends UnityReactActivity { ... }
            Add strings to res/values/strings.xml <string name="game_view_content_description">Game view</string> <string name="unity_root">unity_root</string>
            Update .MainActivity into AndroidManifest.xml <activity android:name=".MainActivity" ... android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="true" android:launchMode="singleTask" >
            Setup minSdkVersion greater than or equal to 19
            Remove <intent-filter>...</intent-filter> from AndroidManifest.xml at unityLibrary to leave only integrated version.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/wowmaking/react-native-unity.git

          • CLI

            gh repo clone wowmaking/react-native-unity

          • sshUrl

            git@github.com:wowmaking/react-native-unity.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link