Reader small image

You're reading from  Ouya Unity Game Development

Product typeBook
Published inOct 2013
Reading LevelIntermediate
PublisherPackt
ISBN-139781783559701
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Gary Riches
Gary Riches
author image
Gary Riches

Gary Riches is a longstanding member of the iOS developer community. He has a keen interest not only in established sections of the industry such as gaming but also in emerging technologies such as Ouya, GameStick, and others. Filled with a passion to program on new systems, he has just become a registered Wii U developer and will also create content for Xbox One and PlayStation 4. To target so many platforms he uses Unity, which he learned while working on the Augmented Reality SBook for Saddington Baynes. When not building software for other companies, he builds his own business by creating photo manipulation apps such as Zombify Me, games such as Aztec Antics and Amazed, and also works on educational apps and games such as Nursery Rhymes: Volume 1, 2, and 3.
Read more about Gary Riches

Right arrow

Setting up your Scenes


You should now have a project panel with seven folders and a scene with Main Camera and OuyaGameObject that you have entered your developer ID into. We are going to use this scene as a setup scene that isn't displayed for long but instead adds all the required game objects. Normally in Unity, when loading a new scene, all objects are destroyed, and then the objects in the new scene are loaded. If it is needed to have an object persist between scenes then there is a method, DontDestroyOnLoad that you can pass an object to. If the object is a component or GameObject then its entire transform hierarchy will not be destroyed either. A side effect of this is that if the scene has the GameObject added to it in Unity and you load it multiple times (on a level select screen for example) then the GameObject will be cloned multiple times and, with a GameObject that handles controller input for example, this can result in multiple controller presses being triggered. We can avoid...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Ouya Unity Game Development
Published in: Oct 2013Publisher: PacktISBN-13: 9781783559701

Author (1)

author image
Gary Riches

Gary Riches is a longstanding member of the iOS developer community. He has a keen interest not only in established sections of the industry such as gaming but also in emerging technologies such as Ouya, GameStick, and others. Filled with a passion to program on new systems, he has just become a registered Wii U developer and will also create content for Xbox One and PlayStation 4. To target so many platforms he uses Unity, which he learned while working on the Augmented Reality SBook for Saddington Baynes. When not building software for other companies, he builds his own business by creating photo manipulation apps such as Zombify Me, games such as Aztec Antics and Amazed, and also works on educational apps and games such as Nursery Rhymes: Volume 1, 2, and 3.
Read more about Gary Riches