Archived

This forum has been archived. Please start a new discussion on GitHub.

IceStorm and Unity3D integration

I'm trying to use Unity3D (v3.5.4) and Ice (v3.4.2) to build an application that can run on several platforms (Android, iOS, maybe PC and Mac). I'm using the csharp libraries so that I can deploy on multiple platforms without having to write different code.

Interestingly, Ice seems to work fine on Windows and Mac, but fails on iOS and Android. The simple application is written to connect to the IceStorm server, subscribe to a telemetry topic, and every 5 seconds publish some data to that topic.

On Android, if I attempt to publish it will block for a minute or two, and then messages will begin to publish properly. It never receives telemetry. This is the code that I'm using to subscribe:
publisher = TelemetryPrxHelper.uncheckedCast(topic.subscribeAndGetPublisher(qos, proxy));

When I change the code to the following however, and publish only (no subscribing) then publishing works immediately, and no blocking action occurs.
publisher = TelemetryPrxHelper.uncheckedCast(topic.getPublisher());

On iOS, the situation is a bit different and I was able to track a seperate issue to Network.cs, in the getLocalAddresses() function. Ice never initializes, and instead throws an exception. For some reason on iOS, you are unable to retrieve the system IP address with the typical function calls. Dns.GetHostAddresses(host) throws an exception when attempting to fetch the local device's name. It appears to be due to the fact that iOS disallows access to /etc/resolv.conf:
http://stackoverflow.com/questions/9281335/default-dns-server-in-monotouch

Comments

  • bernard
    bernard Jupiter, FL
    Hi Craig,

    Welcome to our forums!

    We currently support .NET and C# only on a few platforms: ZeroC - Supported Platforms for Ice 3.4.2.

    Ice for C# may work on additional platforms, but there is no guarantee. Support for additional platforms depends on the needs of our commercial customers. If you are working on a commercial project that needs Ice for C# + Unity3D on iOS, Android (and perhaps more), you should contact sales@zeroc.com.

    Best regards,
    Bernard