|
Currently my scene has GUITextures as object, created from the GameObject menu, not dynamically generated in OnGui. The problem with this is that the code for bumping assets up to retina size, only works on GUIText / GUITextures generated in OnGui and not GUIText / GUITextures that are from the GameObjects menu. How can I make it so any GUI element in my scene will use the Matrix4x4.identity.Scale command?
(comments are locked)
|
|
GUITexture is resolution-independent provided you use the Transform to position and scale instead of the pixelInset rectangle. I'm using iTween to move them about, so they need to be dropped in as game objects in the hierarchy and not built in code.
Jul 15 '11 at 08:25 AM
hawken
Yes, that's fine. In the inspector are you using the Pixel Inset to position them, or the Transform fields?
Jul 15 '11 at 08:37 AM
Waz
ah I see, so pixel inset is a no no for the re-scaling code below? If I do move them around using transform, I'm also wondering, how can I then make them double the size?
Jul 15 '11 at 08:43 AM
hawken
Change the scale.
Jul 15 '11 at 10:23 AM
Waz
care to elaborate a little? I'm not really sure what the code for that might be for this. I get an error because Scale is not part of GameObject.
Jul 18 '11 at 08:02 AM
hawken
(comments are locked)
|
|
heres the retina code that works when GUI objects are built inside it
(comments are locked)
|
