-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any chance of getting the communication from Unity to Flutter in iOS? #161
Comments
We had the same issue. We created a local web server in Flutter and shared messages through HTTP protocol. You can check the built app here: https://www.youtube.com/watch?v=A56gVrDAXbU http_server: any Future _startWebServer() async {
runZoned(() async {
server = await HttpServer.bind(
InternetAddress.loopbackIPv4,
11223,
);
await for (var request in server) {
handleRequest(request);
}
}, onError: (e, stackTrace) => print('Oh noes! $e $stackTrace'));
} |
How did you verify it cannot work? We are trying to get it to work, but somehow the message that is received is always just the first one, just as described here: #107 (comment) Is that the error that you are referring to? |
? |
Are you a genius? |
@SachinGanesh |
Example code to send video URL back to Flutter app private IEnumerator UploadPath(string path)
{
UnityWebRequest www = UnityWebRequest.Post("http://127.0.0.1:11223/record/store", path);
yield return www.SendWebRequest();
if (www.isNetworkError || www.isHttpError)
{
Debug.Log(www.error);
}
else
{
Debug.Log("Video link upload complete!");
}
yield return null;
} |
@SachinGanesh |
This Package supports messages both ways from Unity to flutter and flutter to unity.
Check their example https://github.com/juicycleff/flutter-unity-arkit-demo. |
@TarekMedhat |
@TarekMedhat |
An example was found in another repository. |
You are welcome, Can you share the other example link that you found? |
I found a use case in line 32 of this code |
I really want to get messages from Unity in Flutter.
This package doesn't support it, but is there any possibility of supporting it in the future?
Do you have any alternatives?
Is it possible to implement, for example, writing to a local file from Unity and importing it from Flutter?
The text was updated successfully, but these errors were encountered: