Skip to content

Unity Match-3 puzzle game integrated into a React Native app

Notifications You must be signed in to change notification settings

vsnaichuk/react-native-unity-game

Repository files navigation

Zoo Match is a classic match-3 puzzle game where players move and match animal tiles to create sets of three or more. Using the react-native-unity library, Unity's game functionality is seamlessly integrated into the React Native app.

Prerequisites

Clone the Repositories

Clone this React Native Repo:

git clone https://github.com/vsnaichuk/react-native-unity-game.git

Clone the Unity Game Repo to a separate directory.

git clone https://github.com/vsnaichuk/unity-game.git

Add Unity Game Build

You need to create Android / iOS game build and move it to <THIS_RN_PROJECT>/unity/builds

  1. Open Unity Game Repo in Unity 6
  2. For Android: Build and move the game to <THIS_RN_PROJECT>/unity/builds/android
  3. For iOS: Build the game and follow this instruction

Install Dependencies

In the root directory of the project run:

yarn
npx pod-install

Start Metro

First, you will need to start Metro, the JavaScript bundler that ships with React Native.

To start Metro, run the following command from the root of the project:

yarn start

Start Application

Let Metro Bundler run in its own terminal. Open a new terminal from the root of React Native project. Run the following command to start Android or iOS app:

For Android

yarn android

For iOS

yarn ios

If everything is set up correctly, you should see app running on your Android or iOS device.