I use GUItext in my game, but when I send it to the OUYA none of the text is scaled?
Is this a limitation of OUYA, or Unity, or is there a setting besides 'font size' I need to change for this?
I'd really appreciate some help with this as it pretty much ruins my entire game not being able to use text as it's used for keeping score/time/etc.
Comments
Is there a way to force the 720p resolution?
I heard it mentioned somewhere that someone changed their resolution to 720p and it helped framerate, my project doesn't need 1080p and it would be a nice time-saver if I didn't need to try and setup different font sizes when I'm able to get it working. And even if I did set it up on both I'd need to be able to test 720p for those that don't have 1080p.
Well, you can make Unity render at just one resolution, and automatically scale the entire screen to whatever resolution the device is using, using Screen.SetResolution. That's the closest you can get (and yeah, doing that can really help framerate). And since it automatically scales, you don't even need to use normal resolutions - you could set the resolution to lower than 720p and it'll still scale it to full screen, or halfway between 720p and 1080p if you wanted extra detail on 1080p TV's without the full framerate hit.
Would it at all be possible to request a prefab object to set the screen resolution?
Or is there already a prefab elsewhere?
At the moment it is looking like I'm going to end up having to try and use NGUI,
though I fear how little I'll be able to do as a non-programmer using Playmaker
and how hard it is going to be to change everything to it,
but it's all I'll be able to do if no one is able to respond with a solution to this problem.
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].
NGUI is easier...
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].
internal class UtilityFontCollection : MonoBehaviour
{
public Font font08;
public Font font09;
public Font font10;
public Font font14;
public Font font15;
public Font font16;
public Font font17;
public Font font18;
public Font font19;
public Font font20;
public Font font21;
public Font font22;
public Font font23;
public Font font24;
public Font font25;
public Font font26;
public Font font27;
public Font font28;
public Font font29;
public Font font30;
public Font font32;
public Font font34;
public Font font35;
public Font font37;
public Font font38;
public Font font40;
public Font font42;
public Font font45;
public Font font46;
public Font font48;
public Font font51;
public Font font53;
public Font font56;
public Font font64;
public Font font68;
public Font font85;
internal void setFonts(float screenW) {
float pixel = screenW;
if (pixel > 2400) {
// standard 2560px
Common.fontDouble = font46;
Common.fontSingle = font51;
Common.fontShort = font56;
Common.fontScream = font85;
} else if (pixel > 2000) {
// iPad3 2048px
Common.fontDouble = font37;
Common.fontSingle = font40;
Common.fontShort = font45;
Common.fontScream = font68;
} else if (pixel > 1800) {
// standard FullHD 1920px
Common.fontDouble = font34;
Common.fontSingle = font38;
Common.fontShort = font42;
Common.fontScream = font64;
} else if (pixel > 1500) {
// standard 1600px
Common.fontDouble = font29;
Common.fontSingle = font32;
Common.fontShort = font35;
Common.fontScream = font53;
} else if (pixel > 1400) {
// standard 1440px
Common.fontDouble = font26;
Common.fontSingle = font28;
Common.fontShort = font32;
Common.fontScream = font48;
} else if (pixel > 1300) {
// standard AIR 11" 1366px
Common.fontDouble = font24;
Common.fontSingle = font27;
Common.fontShort = font30;
Common.fontScream = font45;
} else if (pixel > 1200) {
// standard HDReady 1280px
Common.fontDouble = font23;
Common.fontSingle = font25;
Common.fontShort = font28;
Common.fontScream = font42;
} else if (pixel > 1100) {
// iPhone5 1136px
Common.fontDouble = font20;
Common.fontSingle = font22;
Common.fontShort = font25;
Common.fontScream = font37;
} else if (pixel > 1000) {
// iPad2 Mini 1024px
Common.fontDouble = font18;
Common.fontSingle = font20;
Common.fontShort = font22;
Common.fontScream = font34;
} else if (pixel > 900) {
// iPhone4S 960px
Common.fontDouble = font17;
Common.fontSingle = font19;
Common.fontShort = font21;
Common.fontScream = font32;
...
}
}
}
The fonts I set in this way are for my 4 uses: DoubleLiner, SingleLiner, Short, Scream.
I wrote them to a static class (Common.) whre I can access them from anywhere to put them into the GUI labels.
Hope that helps.
CLARK
by GoldenTricycle
Developer for CLARK / GoldenTricycle
Developer of OuyaInput Framework >> GIT
CLARK
by GoldenTricycle
Developer for CLARK / GoldenTricycle
Developer of OuyaInput Framework >> GIT
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].