Aug 6, 2024
Unity Integration in React Native
Learn how to integrate Unity games into a React Native app for a seamless, multi-game experience. This guide covers essential steps and tips for creating a unified gaming platform.
Author


Book a call
Table of Contents
Have you ever wished for a single app where you could play multiple games? Imagine the convenience and excitement of switching between your favorite games without needing separate apps. Today, we're diving into how to integrate Unity games into a React Native application, making this dream a reality. With some foundational knowledge of React Native and an understanding of NativeModules, you'll be ready to embark on this exciting journey. Let's get started!

Problem
Integrate unity game in React Native.
Pre-requisite
- Know the basics of React Native
- Know about how React Native application interacts using NativeModules
Objectives
- Users can play multiple games on a single platform
- To provide a seamless experience while playing the game
Before diving into the topic, let's understand some concepts.
What is Unity?
Unity is a cross-platform game engine developed by Unity Technologies. It can create three-dimensional(3D) and two-dimensional (2D) games, interactive simulations, and other experiences.
What are NativeModules?
The NativeModule system exposes instances of Java/Objective-C/C++ (native) classes to JavaScript (JS) as JS objects, allowing you to execute arbitrary native code from within JS.
Solution
Let's get our hands dirty.
Unity side
- Clone the unity project from the below URL :
https://gitlab.com/rohit-projects1/universal_unity_games/-/tree/master
Then open the project in Unity and click File → Build Settings.

Switch to the android platform and check the export project and symlink sources option.
Click on Player settings on the bottom left and make sure that particular checks are checked as per the screenshot below.
Make sure you use IL2CPP in the Scripting Backend and select the target architectures as shown below.
Also, confirm that the strip engine code is checked.
- That’s it. Now go back to build settings and click Export. Select the
buildsfolder inside the project, and you will see that the Android folder will be built.
Note: Ignore the Adapter performance settings if you get the warning while exporting.
Bonus
- If you want to play the game directly in Unity. It’s easy
Go to Assets → Scenes → Double click on TicTacToe
In unity only, you will below interface. Click on Game, select the aspect ratio and just click the play button ▶️. That’s it.
React Native Side :
First, let's create a new React Native app.
npx react-native init AwesomeTSProject --template react-native-template-typescript
For integrating the unity game, we need to install a package named @azesmway/react-native-unity. Refer to the this link.
Code Explanation :
- Create a unity folder and also builds a subfolder as seen in the below screenshot. Now copy and paste the android folder generated from the unity.
First, create a reference to the unity view :
To display the unity view, we use the UnityView component provided by the package, and We can get a message from unity to RN by callback of the function onUnityMessage(message) :
Simple, right?!
To send a message to the unity application/game we use postMessage() function.
To send a message from Unity to React Native, we use the AndroidJavaClass object. Please refer to the ButtonPressed() function below. For more details, please refer to the package mentioned above.
You can see the demo video: here
Conclusion
By integrating Unity games into a React Native app, you're not just merging two powerful technologies—you're enhancing the gaming experience with seamless transitions and unified access. This guide provides the essential steps to achieve this integration, offering a single platform for multiple games. As you explore and implement these techniques, you'll discover new possibilities in game development and user engagement. Dive in and transform your app into a versatile gaming hub!
Related Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Apr 23, 2026
From Manual Testing to AI-Assisted Automation with Playwright Agents
This blog discusses the value of Playwright Agents in automating workflows. It provides a detailed description of setting up the system, as well as a breakdown of the Playwright Agent’s automation process.

Apr 14, 2026
The Keyboard Bounce of Death: Handling Inputs on Complex React Native Screens
Fix the React Native ‘Keyboard Bounce of Death.’ Learn why inputs jump and how to build smooth, production-ready forms with modern architecture.

Apr 9, 2026
From RFPs to Revenue: How We Built an AI Agent Team That Writes Technical Proposals in 60 Seconds
GeekyAnts built DealRoom.ai — four AI agents that turn RFPs into accurate technical proposals in 60 seconds, with real-time cost breakdowns and scope maps.

Apr 6, 2026
How We Built an AI System That Automates Senior Solution Architect Workflows
Discover how we built a 4-agent AI co-pilot that converts complex RFPs into draft technical proposals in 15 minutes — with built-in conflict detection, assumption surfacing, and confidence scoring.

Apr 6, 2026
AI Code Healer for Fixing Broken CI/CD Builds Fast
A deep dive into how GeekyAnts built an AI-powered Code Healer that analyzes CI/CD failures, summarizes logs, and generates code-level fixes to keep development moving.

Apr 2, 2026
A Real-Time AI Fraud Decision Engine Under 50ms
A deep dive into how GeekyAnts built a real-time AI fraud detection system that evaluates transactions in milliseconds using a hybrid multi-agent approach.