Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to integrate unity in React native?

Is this possible to integrate / configure unity(game engine) with react native and develop the game based application? if yes, can you tell me what is the procedure / architecture? Thanks

like image 588
thaveethu gce Avatar asked Jul 18 '17 10:07

thaveethu gce


1 Answers

You can embed a WebGL component inside a RN app. And then load the game build from some server.

react-unity-webgl can be helpful here.

Something on these lines

//constructor
this.unityContent = new UnityContent(
  "<YOUR_BUILD_FILE>",
  "<YOUR_UNITY_LOADER_FILE>"
);

//render
render() {
    return <Unity unityContent={this.unityContent} />;
}

enter image description here

like image 70
Kashif Siddiqui Avatar answered Sep 27 '22 22:09

Kashif Siddiqui