#Viewport 2D how dos it work?

1 messages · Page 1 of 1 (latest)

queen barn
#

Need a help .When i start a scene there is a viewport . How i change the setting of that viewport ? If i put down a Camera2d and i zoom out, i can see everything, and that small viewport i use for what ? I don't understand how is work ,don't find any tutorial .Why i need this default viewport and how i setup ? THX

turbid berry
#

You mean the blue rectangle? That represents the base size of the game

queen barn
#

yes

turbid berry
#

Even if you zoom out the camera will still be resized to fit the viewport

queen barn
#

no

turbid berry
#

If you want to change the blue rectangle go into project settings

queen barn
#

i show you

turbid berry
#

It's under display

queen barn
#

when i run it ,i see the camera look ,that viewport do nothing

turbid berry
#

Yeah the viewport is just the base size

#

It doesn't have to match what actually is shown in the end

queen barn
turbid berry
#

You can go into editor settings and make it invisible if you want

queen barn
#

is this ?

#

Is there an advantage to setting this default viewport to the size of the game or camera? I couldn't find where to set it.

turbid berry
#

Yeah if you have like a pixel art game and don't want it to be really small you can set the viewport size and the stretch mode to make it resize with the window

#

It doesn't look like you are making a pixel art game though

queen barn
#

yes, not pixel art

turbid berry
#

Also, when the game is exported, you need to set the stretch mode for it to resize the way you want it

#

The options in the "game" menu won't be there

queen barn
#

ohh i find it

#

its a bug..doesn't work when i a change the display size, just if i go 3d mode or script mode and back 😄