Author Topic: Create local server with mobile Android & iOS  (Read 3604 times)

dereklam0528

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 20
    • View Profile
Create local server with mobile Android & iOS
« on: April 16, 2014, 09:00:13 AM »
Hey,

I just bought the package, and I tried to run the server example on mobile (Android & iOS), after I press "Start Server", the server list window doesn't show up. Is there something wrong with my setting? How does it work? I run the scene on Unity Editor and it works fine.



This is the screenshot from the Unity Editor



This is the screenshot from my Android device, see there is no window on the right hand side after I start my local server?

 :-[


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #1 on: April 16, 2014, 11:29:47 AM »
What is the device connected to? If it's to the same WiFi network as your computer, it should work as expected. If it's connected to 3G, you won't be able to see any servers as you can't host anything over 3G (UDP doesn't work).

dereklam0528

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #2 on: April 16, 2014, 11:32:27 AM »
I am using my WiFi network at home, both devices computer and mobiles are connected to my home wifi.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #3 on: April 16, 2014, 11:35:42 AM »
Are mobile devices able to see the server hosted on the PC? Are you able to connect to it directly using its local IP?

dereklam0528

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #4 on: April 16, 2014, 11:45:09 AM »
Yes, my Android phone can see the server hosted on the PC, also my PC can connect to my Android phone local server when I hit start server and enter my Android phone ip address directly into my PC.

dereklam0528

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #5 on: April 16, 2014, 08:01:47 PM »
But how come the server list doesn't come out when I host a local server on mobile? Do I really have to type in the IP address manually?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #6 on: April 17, 2014, 02:10:30 PM »
Well, sounds like for whatever reason your android device can't do network broadcasts. Some security measure, perhaps?

dereklam0528

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 20
    • View Profile
Re: Create local server with mobile Android & iOS
« Reply #7 on: April 21, 2014, 08:44:45 PM »
Finally got it solved! For some reasons the sample scene didn't quite work. If I write my own script, then it works. :)