This repo has been created as reference code samples for a set of whitepapers produced to help developers in porting their Unity games to Windows 8.1 and Windows Phone 8.
It is recommended that you read these whitepapers before delving into the code.
The prerequisites for working with these samples are in either of the Getting Started documents above.
Small demonstrations and code snippets for most of the approaches outlined in the papers.
This repo contains the following folders:
There are currently the following tasks in the game for both Windows 8.1 and Windows Phone 8
For Windows 8.1, there are a couple of extra snippets
WACK fixers has working implementations of missing classes in .NET Core. Currently, it has Collections, IO, Sockets, Threading, and other useful class extensions. There is more coming soon.
Facebook Integration (Login, Logout, Friend Request) (WP8 has known issues, see below)
Window Resizing sample, pause/resume at 500px (Windows 8.1 only)
Orientation Change Support Via the sample plugin, Unity can respond to orientation changes
Xaml Textbox Overlay Via the sample plugin, Unity can show a XAML textbox as an overlay to get keyboard input from soft (aka touch) keyboard.
The first time you build, you need to follow specific order:
See below for tips on each step:
Note: If you make changes to Unity scripts and game, you can just keep building to PlatformerWindowsStore project and it won't override your Visual studio project. If you add new plugins or change the player preferences, you will need to merge these manually.
Note: If you make changes to Unity scripts and game, you can just keep building to PlatformerWindowsPhone project and it won't override your Visual studio project. If you add new plugins or change the player preferences, you will need to merge these manually.
The plugin binary outputs are included in the Unity project automatically, but you can update and easily have Unity get the updated plugins.
To build the plugin, open the \UnityPorting\PlatformerPlugin\PlatformerPlugin.sln with Visual Studio 2013 and set the build configuration for "Release" and "Any CPU", there is a post build event that will automatically copy the resulting MyPlugin.dll (and any adjacent dlls in the target directory) to the correct locations in the Unity project automatically as follows:
Note: If you make changes to the plugins later, every time you update the plugin, you should rebuild in Unity and Visual Studio. Make sure in Visual Studio when rebuilding the plugins, to set the build to 'Release' and 'Any CPU'.
We are just getting started. Currently, it is a sample and lots of useful snippets you can copy and paste into your projects.
We need to:
Facebook plugin issue on Windows Phone 8 - The web page that appears after selecting a friend to invite has intermittent issues, sometimes the cancel/send invite buttons don't appear. The buttons when they do appear never work though. This is a WP8 specific issue.