I followed the guide posted by tgraupmann a while back on how to run my Unity game on my Ouya. Ever since then I've given little thought to it.
But recently I've been expanding my game, and it now has multiple levels.
First of all, after I had been working on this for a while, it dawned on me that I had NOT been adding that "Ouya game object" into each of my levels. Despite this, the game ran fine. Each level had no problem.
This leads me to wonder what that game object was even doing. I remember being told that I had to put one in my scene, but yet I have it in only one scene, and I have no problems. It's not even my first scene, in fact, it's the very last scene that can be loaded in my game's progression.
But this isn't just a mere curiosity regarding what that object does. I've also noticed a problem.
Each time I load that one level, I get another Ouya Game Object. I never noticed it until I had a title scene that has almost no objects. But yet if I play to that level, each time it loads (including when I die) I collect another Ouya Game Object.
And I think it may be overloading my memory. (At least something is, and that is a candidate.)
Please advise.
Comments
OUYA Inc | Android Developer
Skype: tgraupmann_prey
http://github.com/ouya/docs
http://github.com/ouya/ouya-sdk-examples
Check out the latest docs for your game engine: [setup] [adobe air] [android] [clickteam fusion] [construct 2] [corona] [libGDX] [game maker] [html5] [marmalade] [monogame] [unity] [unreal]
Use caution when setting [persistent wireless mode].
To prevent other platforms from having a redundant object in the scene (or having to remember to add/remove it when switching), you can create the OuyaGameObject programmatically like so:
// Create the OuyaGameObject (put this block inside an 'isRunningOnOuya' check)
GameObject container = new GameObject();
container.isStatic = true;
container.name = "OuyaGameObject";
ouyaGameObject = container.AddComponent(typeof(OuyaGameObject)) as OuyaGameObject;
ouyaGameObject.DEVELOPER_ID = DEVELOPER_ID;
www.demonstudios.com
Follow: Facebook | Twitter