0

I'm trying to receive a message in Unity from a client connected. However, I do not find a way to create a server in Unity that accepts an external client (an iOS app) and reads messages. Any help?

Thanks!

Mark
  • 113
  • 7
  • look at my question here http://stackoverflow.com/questions/15832580/passing-ios-native-objects-back-to-unity3d – Injectios Apr 20 '16 at 22:00
  • UnitySendMessage is this what u looking for? – Injectios Apr 20 '16 at 22:00
  • I don't think so. I'm going to use an Objective-C app and TCP socket to send the string. I want my iOS app to connect to an IP and port (defined by the server in the Unity side). – Mark Apr 20 '16 at 22:46
  • -I do not find a way to create a server in Unity that accepts an external client -> create it on iOS side and pass data that you need back to Unity – Injectios Apr 20 '16 at 23:10
  • I'm trying to create a c# server inside Unity directly. I'll keep you updated! – Mark Apr 20 '16 at 23:20

1 Answers1

2

Using socket with unity is a bit complicated and tricky but it is possible. I answered this question few days ago and see no need to re-post the code here. Here is a complete working Unity socket server code.

Unity3d C# plugin to act as a socket server

Community
  • 1
  • 1
Programmer
  • 121,791
  • 22
  • 236
  • 328