Game Development Reference
In-Depth Information
Handling platform differences
Unity does a lot for developers to abstract us from the many platforms you can deploy to.
Most of the common functions, such as memory management, audio, controller inputs,
purchasing, and so on, are all implemented with a single generic interface with Unity3D.
This means you do not need to write a separate code to play an audio file, or draw to the
screen for each and every device or platform that you want to support and deploy to. It
really is a big time saver (ask anyone who has written their own engine just how much fun
they had doing everything multiple times for each platform).
Unity does a lot, but it doesn't do everything. For the following fringe areas, you will have
to do the leg work to get these features implemented:
• Social integration (Facebook and so on)
• In-app purchasing
• Alternate physics or networking implementations
The list goes on. In a lot of cases, there are already pre-made assets on the Unity store that
have done the hard work to build these implementations. A fair few, you will note, do not
support all platforms. In these cases, it will get you most of the way, but you will either
have to wait for them to support platform X or write it yourself.
In all cases, assets need to integrate tightly with the underlying platform. They have made
use of the interoperability features available in Unity, which this chapter will go through
in detail, what each asset has to offer, and what it brings to the table. Some are simple to
perform, others not so much. Also, in some cases, you will have to work with the Unity
platform build system to push your changes onto the platform (though not absolutely ne-
cessary, this will save you from having to repeat every build or if you want to create your
assets). The following diagram shows the layout of how Unity works with the platforms it
supports:
Search WWH ::




Custom Search