getting png to display full screen on the camera

How can i get my png menu screen to display full screen on the game camera…its pretty small
is it the picture that needs to be resized or is there a setting on the camera?

it allows me to drag and expand the picture but not all sides, it only adjusts all sides equally resulting in a square thats cut off when i run it full screen.

thanks

Aspect Ratio 101.

Your menu image should be the same aspect ratio as your game resolution is. So if your game resolution is 1920x1080, or 1280x720, then your aspect ratio is 1.77 (1280/720=1.77), and so the resolution of your image should have a ratio of 1.77 if you want it to match up with all edges at that resolution.

If you merely scale one axis of the image, then you’re going to stretch parts of it… Unless it’s a gradient or solid color and won’t be noticeable, then that’s fine. In that case you can hold shift… I think, and scale it to change it’s aspect.

And yes, scale up the image to fit the camera, though if your camera settings and sprite settings are setup properly so that the pixels of the sprite are the same amount on screen, you shouldn’t need to unless the image resolution is lower than your game resolution.

Thanks invertex…last thing…where do i set the resolution the camera is working in…can i??? i find the simplest things lacking in information when i google problems…bit annoying…any good beginners tutorials you could recommend a newb to start at???

In your Game window, there’s a drop down menu for resolutions. You can set them there. But if you’re going to be making a game that can be played in different resolution, you may have to do a different approach so your texture looks nice for each resolution.

There’s a script here that will adjust the camera based on your set resolution and set Pixels Per Units on the script (should be set to same as you do on your imported Sprites)
http://forum.unity3d.com/threads/210497-Pixel-perfect-2d-in-4-3/page2?p=1513436&viewfull=1#post1513436

There are plenty of 2D tutorials on Youtube now, though I cannot personally recommend one, I just read up a lot on C# programming and searched up any issues I ran into to learn, examining example code to see how a problem was solved so I made sure I understood instead of just copying things.

thanks for all that info…really helped…is there a way to auto center the png in front of the camera?..sorry all the questions

Making it a child object of the Camera would be the simplest, code-free way (and set the x,y position to 0 for the sprite afterwards), or if you know your camera is always going to be at that position, then just copy the camera’s position.

Making it a child object of the Camera would be the simplest, code-free way (and set the x,y position to 0 for the sprite afterwards)…how would you do this? also im following along with this tutorial… Menus - loading and restarting the game — Pixelnest Studio

i didnt download the two images as i already have my menu screen created in photoshop, its a png
i fitted it nicely to the camera by stretching it using shift (like you said) it didnt lose any quality, looks ok

i just dont get this part when trying to add a button…

Loading script
Now we will add a button to start the game, via a script.

Create a new “MenuScript” in the “Scripts” folder, and attach it to a new empty game object (called… “Scripts”? Just saying.):

using UnityEngine;

///


/// Title screen script
///

public class MenuScript : MonoBehaviour
{
void OnGUI()
{
const int buttonWidth = 84;
const int buttonHeight = 60;

// Draw a button to start the game
if (
GUI.Button(
// Center in X, 2/3 of the height in Y
new Rect(
Screen.width / 2 - (buttonWidth / 2),
(2 * Screen.height / 3) - (buttonHeight / 2),
buttonWidth,
buttonHeight
),
“Start!”
)
)
{
// On Click, load the first level.
// “Stage1” is the name of the first scene we created.
Application.LoadLevel(“Stage1”);
}
}
}

is this in c#??? can you just briefly explain how scripts are connected to objects etc…any help appreciated

thanks for your help so far

Yes, that’s C#, you can tell by the use of “void” instead of “function”. And the use of “new” keywords.

You don’t know how to connect a script to an object yet? I think you are jumping ahead too quickly. Watch and learn the Beginner section on this page first, and things will start to make a lot more sense.

Participate as you watch them, trying out the code yourself, but also changing it up, to make sure you understand how it’s working.

You’ll want to watch the Intermediate section at some point in the future as well, especially the coroutines section, but it would be a lot of information at once for many people, the basics in the Beginner section are absolutely essential to learn.

i cant thank you enough…i will start with what you recommend…again thanks for your time