Project 02ReactWithUnity: Unity Inside a React Native App: cover image coming soon2025
Recognition

Employee of the Month at EuphoriaXR for this work.

Team
  • EuphoriaXR
AR/VR & ToolsCompany project

ReactWithUnity: Unity Inside a React Native App

My first task at my first part time job at EuphoriaXR. My CEO asked me to run a Unity app inside a React Native app. The result is a mobile app where React Native handles the screens and navigation, and Unity loads inside it with messages going both ways.

My roleMobile and Unity integration developer
Year2025
DisciplineAR/VR & Tools
PlatformsAndroid and iOS
ContextCompany project
  • Unity
  • C#
  • React Native
  • TypeScript
  • Kotlin
  • Objective-C++
  • Android
  • iOS

Case study

Role & contribution

What I built

I embedded the Unity runtime into a React Native app and set up communication so React Native can start and control a geospatial scene inside Unity and receive messages back.

  • React Native shell with a home screen and navigation
  • Embedded Unity screen inside the app
  • Messages from React Native to Unity to start the scene
  • Android integration using the generated Unity library
  • iOS project setup

Features

Highlights

  • Navigation from the React Native home screen into Unity
  • Delayed Unity start after the view loads
  • JSON messages sent to Unity
  • Messages from Unity logged back in React Native
  • Support for multiple Android architectures

Behind the build

Technical notes

  1. Unity Android library added to a React Native project through Gradle

  2. TypeScript to Unity messaging using game object, method name and JSON

  3. Works with Unity IL2CPP output and native libraries