Work

Porting Unity projects to various platforms.

Luckily, Unity has done most of the work for you when you need to port to other platforms. But that work is just the rendering and game scripting. In some cases the scripting is not readily portable. The case of porting to windows phone/tablets, you will find that the newer .net version that they rely on can be problematic because Mono is .net 3.5 compliant and some of the core classes have been removed or replaced. And if you use something other than C#, you are going to be running into other issues, such as strange errors with enumerators and type casting.

Porting to other systems, such as the Vita, iOS, Android is a lot simpler, because it just uses Mono for its scripting runtime and does not try to hook into some other native compiler.

The issues with porting to Android, is that if you happen to be using other plugins that create native activities, you might need to implement your native plugins as activity proxies. Luckily the plugin providers supply you with such interfaces. Simple things can also be achieved without writing native .java plugins because there are some reflection classes that allow you to create instances of various native java classes. There is also the matter of texture compression that can cause minor issues, because the compression format varies between the various flavours of android devices. You might need to create a separate package for every graphics chip flavour, unless you skip compression completely.

If you plan on creating a Unity project that should work on ALL the platforms, be sure to stick to C#, be aware that the windows platform will need special considerations for various types, mostly in the networking area. Texture compression can be an issue on the Android device and you can only have one Main Activity for native plugins.

You will have to do work to support the platforms, even though Unity has done most of the work. There is no free ride.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s