43
Unity and Azure Mobile Services David Douglas @deadlyfingers

Unity and Azure Mobile Services using Prime31 plugin

Embed Size (px)

DESCRIPTION

Unity and Azure Mobile Services using Prime 31 plugin demo.

Citation preview

Unity and Azure Mobile Services

David Douglas@deadlyfingers

3 takeaways…

1 Azure Mobile Services2 Unity plugins for Azure3 Building demo project

1 - Azure Mobile Service

What is Azure Mobile Services?Cloud backend in minutes!

Create Azure Mobile Service- Start free trial

aka.ms/azure_trial- DreamSpark (students)

dreamspark.com- BizSpark (startups)

microsoft.com/bizspark

Create Mobile Service

Create Mobile Service

Create Mobile Service

Create Mobile Service

Create Mobile Service

2 - Unity plugins for

Azure Mobile Services

A couple of choices..

*Requires JSON.NET for Unity asset ($20)

BitRave• Free• Runs across “everything” –

– Windows 8 & WindowsPhone 8 – iOS*– Android*– UnityEditor

Prime[31]• Free (until July 2015)• Well documented• Runs across

– Windows 8 and WindowsPhone 8– UnityEditor*

*Runs, but does not connect in UnityEditor

3 – Building demo project

Download Azure Plugin

http://prime31.com/plugins

Download & Install Azure SDK

http://tinyurl.com/installazuresdk

Add Demo Table

Create New Unity Project

Download & Open the Plugin

7 Prime[31] API functions// Prepares the connection to the Azure servers. This must be called before any other methods.public static void connect( string applicationUrl, string applicationKey )

// Inserts a new item into the databasepublic static void insert<T>( T item, Action completionHandler )

// Updates an item in the databasepublic static void update<T>( T item, Action completionHandler )

// Deletes an item from the databasepublic static void delete<T>( T item, Action completionHandler )

// Queries the databasepublic static void where<T>( Expression<Func<T,bool>> predicate, Action<List<T>> completionHandler )

// Looks an item up to see if it is in the databasepublic static void lookup<T>( T item, Action<T> completionHandler )

// Authenticates a user with the service provider. Note that the service provider must first be setup in the Azure web dashboard! // The completionHandler will return null in the event of a login failure.public static void authenticateWithServiceProvider( MobileServiceAuthenticationProvider serviceProvider, Action<MobileServiceUser> completionHandler )

Unity 4.5.1+

Gotyas!• Download & install the Mobile Services SDK

before using the Prime[31] Azure plugin.http://go.microsoft.com/fwlink/?LinkId=257545&clcid=0x409

• Add "P31MetroAzure.dll" to Unprocessed Plugins in Player Settings

Couple more things!!

WinBridge for Windows Store• Windows store

- In-app-purchases- trial upgrade- receipt management- Windows store debugging

• Native message dialogs• Native & hardware-accelerated video playback• 100% open source

Lifetime Dev Center• No more annual fees!

https://devcenterbenefits.windows.com/

LinksPrime31 Plugins

https://prime31.com/plugins

Prime31 Info http://blogs.msdn.com/b/dave_voyles_for_gaming_html5_and_xbox/archive/2014/08/13/prime-31-azure-mobile-services-plugin-for-win8-amp-wp8-unity-games.aspx

Prime31 Video (leaderboard)

http://channel9.msdn.com/Series/Developing-2D-3D-Games-with-Unity-for-Windows/09

Prime31 Blog (leaderboard)

http://davevoyles.azurewebsites.net/prime31-azure-plugin-win8-wp8-unity-games-part-2/

Unity Rewards Program

http://www.wpdevcenteroffers.com

Windows Lifetime Store Account

http://blogs.windows.com/buildingapps/2014/09/17/new-dev-center-lifetime-registration-benefits-program/

ThanksQuestions? @deadlyfingers