Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ouya Unity Game Development

You're reading from   Ouya Unity Game Development Understanding Unity means you can quickly get the know-how to develop games for the Android-based Ouya console. This is the guide that will take you all the way from setting up the software to monetizing your games.

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher Packt
ISBN-13 9781783559701
Length 118 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Gary Riches Gary Riches
Author Profile Icon Gary Riches
Gary Riches
Arrow right icon
View More author details
Toc

Implementing the Ouya payment framework


The Ouya examples provide a really good stub class for your In-App Purchase needs, we'll import that in to our project as a base for the code. The file is located in the folder where you installed the Ouya Unity repository to in Chapter 2, Setting Up Unity and the Ouya Plugin. From inside that folder navigate to Assets\Ouya\Examples\Scripts and drag the OuyaShowProducts file in to the Scripts folder in our Project panel. Double-click on it to edit it in MonoDevelop, and have a look at the method names to become familiar with the method names that we will need to call and respond to. At the moment we're going to use the script as it is. There is some code already in the script that will build a Graphical User Interface (GUI) and display a menu system for seeing your products.

Back in Unity, open your SetUp scene and add a new, empty game object to it. Call it IAP and drag your OuyaShowProducts script on to it. We need to make sure that this new, empty...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image