Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Antifuzz

Pages: [1]
1
Support / Weird problem setting font dynamically on iOS
« on: August 20, 2013, 04:49:05 pm »
I'm getting a strange problem when changing the font dynamically on iOS (which I need to do for localisation).

I've got my fonts in my Resources folder, and am changing them at runtime like this:

textBox.font = (Resources.Load("euro_blue") as GameObject).GetComponent<tk2dFont>()

... and it works fine in the editor. No problems.

BUT... when I compile for iOS and test on a device, the changed fonts show up all garbled as if they are using a spritesheet from another seemingly random font asset in the library.

The only way I've found to fix it is to manually place a textfield somewhere off-camera in a scene with its font set to the new one that I'm changing too. Which kind of reminds me of working in Flash circa 2003. ;)

It's as if the fonts I have in my Resources folder aren't actually getting packaged into the app unless I brute-force it by placing dummy text fields in my scene.

I can of course, just do the above, but it feels super-clunky and obviously doesn't scale well as I add more fonts. Am I missing something?

2
Support / Re: Problem with 4096 textures
« on: May 30, 2013, 05:23:41 pm »
Yep. Looks like that's the problem. Flash doesn't do anything larger than 2096.

3
Support / Re: Problem with 4096 textures
« on: May 30, 2013, 04:09:42 pm »
Thanks for getting back so quickly!

I've worked out that it's because my platform is Flash Player. I don't get the half-res if I publish for web player.

I've checked the quality settings for Flash Player though, and it is set to full-res. Is it just a restriction of targeting Flash that you can't use 4096 textures?

4
Support / Problem with 4096 textures
« on: May 30, 2013, 03:17:40 pm »
I've got a large sprite collection which will only fit onto an atlas size of 4096x4096, but when I make a sprite using this collection, the sprite comes out at half the level of pixel detail.
I can open the atlas in Photoshop and see that it has indeed been created at 4096, and that the sprites are the correct resolution, but for some reason they come out at half res when added to a sprite.

I'm also a bit suspicious about the fact that when I select the atlas in the Project library, the preview window claims that it's 2048x2048, even though I know it's not.

If I split it over several 2048 atlases, everything works fine.

Any ideas?


Pages: [1]