Is there any way to communicate with reactjs application with exported godot game.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rackrall

Hi there.
I am trying to develop a game but I need to verify input from my backend. Since I am using specific session info inside the cookies I need to interop with my react app’s functions to do this.

There is a third party package about this for unity. Is there a way for me to do the same scheme?

Currently I am using an iframe to host my game on my react website.

You can use the javascript object plus postMessage to communicate between Godot and the website Godot Game <-> Browser Page Communication / Andrew Wooldridge | Observable

Andrew Wooldridge | 2023-06-11 18:58

:bust_in_silhouette: Reply From: MoltenCoffee

I’m not aware of any existing packages, but you might want to look into the JavaScript class, that allows you to call JS from Godot. This probably won’t directly tie into react, but you might be able to poll some global state.