Unity 3.x had an issue with the byte order mark at the start of XML
files, which there was a code work around for. Unity 4 has subsequently
fixed the issue, so the work around has been ifdef'd to work only on
Unity 3.x.
The XNA 4.0 PlatformerGame sample is successfully running inside Unity3D
3.5.
Implemented a basic game loop, game timing, content loading for
Texture2D, SoundEffect and Song. Emulated SpriteBatch drawing for
sprites and strings (note SpriteFont is not yet supported to all strings
are rendered using the default GUI label font). Songs can be played
using an AudioSource attached to the XNATest game object which acts as
an emulator for MediaPlayer. Playing a SoundEffect creates a game object
with an AudioSource attached which is automatically deleted when the
sound finishes. Implemented keyboard input with a limited set of XNA
Keys mapping to Unity3D KeyCodes.