2D Toolkit Forum
2D Toolkit => Support => Topic started by: gonzalez.martin90 on April 06, 2015, 02:06:47 pm
-
Hi!
i'm using a tk2d camera with the native resolution 960x640 and when i want to create a texture (Unity texture) of the Screen.width and Screen.height it doesnt fit unless the resolution is 960x640.
Also it depends on the aspect ratio.
is there a solution to create a full screen texture?
Thanks!
-
Either
1. Resize your sprite to fit the ScreenExtents. This won't be pixel perfect, or even have square pixels for obvious reasons.
or
2. Create a second tk2dCamera that holds the background (use layer masks to make it only draw in there) with override set to StretchToFit. This will stretch the background to fit the screen, but won't be pixel perfect or have square pixels for obvious reasons.
or
3. Make your background sprite bigger to fit all the aspect ratios you care about, so when it draws more it has something to draw.
-
Either
1. Resize your sprite to fit the ScreenExtents. This won't be pixel perfect, or even have square pixels for obvious reasons.
or
2. Create a second tk2dCamera that holds the background (use layer masks to make it only draw in there) with override set to StretchToFit. This will stretch the background to fit the screen, but won't be pixel perfect or have square pixels for obvious reasons.
or
3. Make your background sprite bigger to fit all the aspect ratios you care about, so when it draws more it has something to draw.
Thanks for the answer but the texture that im creating is a Unity Texture2D
This is the problem.
I have a coloring app that the image is in black and white (black the borders)
So i want to take a screenshot with RenderTexture that its working fine and create a texture with the screenshot i took and put to it the screen size. But if i put screen.width and height depending the resolution is smaller.
Here i took a picture.
(http://i59.tinypic.com/2lxccye.png)
-
Same thing applies to Unity textures as well.
-
Same thing applies to Unity textures as well.
Worked!
Thanks