如何在React原生中整合统一?

tha*_*gce 5 unity-game-engine ios reactjs react-native

这是否可以集成/配置统一(游戏引擎)与本机反应并开发基于游戏的应用程序?如果有,你能告诉我什么是程序/架构?谢谢

Kas*_*qui 2

您可以将 WebGL 组件嵌入到 RN 应用程序中。然后从某个服务器加载游戏版本。

React-unity-webgl在这里会很有帮助。

这些线上的东西

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

//render
render() {
    return <Unity unityContent={this.unityContent} />;
}
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述