View Full Version : [Solved] ES5 - Unity3.3 - Android
Kazuya Takata
04-15-2011, 01:31 AM
Dear ES5 support,
Hi, I am kt.
One of our important client asked us if ElectroServer5.1 works fine with Unity 3.3 Android (as they tested by themselves it didn't work right) - and since I am not sure, if you can update us about your current status about it.
Thanks in advance,
tcarr
04-15-2011, 01:53 AM
We have not tested with Unity Android. It works fine with Unity 3.3 web player - I just upgraded to 3.3 this morning.
Kazuya Takata
04-15-2011, 03:01 AM
Hi.
I try ES5 with Android Unity, but do not success well.
Will not there be the way to let you succeed somehow or other?
If there is a good way, please teach it.
tcarr
04-15-2011, 03:55 AM
I'll test it myself and let you know what I find.
edit: Unity Android requires a paid license, so I've asked another Electrotank employee who has a license to look into this. It might take a while for him to have time to do so.
tcarr
04-15-2011, 03:36 PM
When you tried ES5 and Unity, were you trying a new application or just taking one of our ES5 Unity examples and trying to publish it to Android?
edit: what IP are you trying to hit with Unity Android? When I do Java Android apps for ES5 I have to use an external IP for testing, because otherwise it can't find my ES5.
Kazuya Takata
04-18-2011, 01:58 AM
I am sorry to be late.
"SimpleChat" of ES5 succeeded in WebPlayer.
However, after converting a source for Unity Android, I was not able to be connected from Android terminal.
We can access it only by Wifi way in the server from the outside.
If there is it via Wifi, I can watch a Web server via Android.
tcarr
04-18-2011, 02:39 AM
I don't understand what the bug is. Are you saying that you have to configure your ES5 for remote access, and use the remote IP address? Because that's what I have to do with Java Android to get it to work with ES5, even when I'm using the emulator. 127.0.0.1 is the callback for the android phone itself, so it wouldn't be able to find your ES5.
Kazuya Takata
04-18-2011, 06:13 AM
Yes, I configure ES5 for a remote access.
I chage it.
"127.0.0.1" -> "RemoteIP"
Does ES5 have plugins for Unity-Android?
Unity-WebPlayer succeeded in this plugin.
~/Assets/Plugins/Electroserver5-Unity.dll
It seems to be written that different plugin is necessary when I look at this site.
http://unity3d.com/support/documentation/Manual/Plugins.html
tcarr
04-18-2011, 01:20 PM
The ES5 dlls for Unity are found in your installation folder, apis/client/c_sharp/unity/dist/. You probably need all the dlls. We have tested extensively with the web player but only started trying to test with Unity Android when you posted this thread. I'm not doing the testing myself because I don't have a license for Unity Android. The results of our testing will be reported here when they are available.
The url that you reference appears to apply only to dlls that are compiled C libraries. The ES5 dlls are C# libraries.
Kazuya Takata
04-19-2011, 02:39 AM
The error capture when executing it from the emulator is sent.
http://www.brand-shop-gothic.jp/test/ES5_ChatSimpleTest.jpg
tcarr
04-19-2011, 01:19 PM
Web player needs to use PreFetch. Standalone shouldn't use PreFetch, because it isn't needed and causes a run time error. I'm not sure which Android needs. If Android does need PreFetch, then your prefetch line needs to use just the numerical IP, not the hostname. What I've been doing lately is:
private string getIP(string host)
{
return Dns.GetHostAddresses(host)[0].ToString();
}
.....
#if UNITY_WEBPLAYER
Security.PrefetchSocketPolicy(getIP(serverURL), Convert.ToInt32(serverPort));
#endif
Kazuya Takata
04-20-2011, 01:28 AM
It was solved. Thank you!
commentout here.
// Security.PrefetchSocketPolicy(getIP(serverURL), Convert.ToInt32(serverPort));
it work.
Thank you kindly !
tcarr
04-20-2011, 01:25 PM
Huzzah!!!!
Powered by vBulletin® Version 4.1.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.