Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Unity Setup Guide Sticky

A topic by WayfarerGames created Jul 29, 2019 Views: 1,232 Replies: 8
Viewing posts 1 to 5
Submitted (1 edit) (+4)

Hey guys, just thought I'd make a quick post to explain how to set this up for Unity!


1) Create a new render texture, set the size to 64 x 64 and set the "Filter Mode" to "Point". This is what the camera will render to, and will ensure the whole game takes place inside the required 64x64 resolution.

2) Make the camera render to this texture by setting it in the "Target Texture" field of your main camera. 

3) Create a new UI Raw Image to actually display the game, and set the Texture to your render texture. Add an "Aspect Ratio" fitter component, set the Aspect Mode to "Fit In Parent" and the Aspect Ratio to 1, then set the Transform's Anchors Min to 0 and 0, and the Anchors Max to 1 and 1, then set top and bottom to 0. It should look like this:


4) Create a new camera to render the game (I called mine RenderCam), then set up the Canvas object like this:



I'd also add a layer for your canvas called something like "Render", and make the RenderCamera only draw that layer, and remove it from the Main Camera's culling mask. You should now have a camera that ALWAYS renders a 64x64 image, regardless of what the screen's resolution is. There will be black bars on the left/right or top/bottom depending on the screen's aspect ratio, but the game will always be rendered to a 64x64 image - which SHOULD be within the rules, right? Tell me if I'm wrong!

Submitted(+1)

This is the way I did it last year, it's the easiest way to get a 3D game to 64x64 for sure. I feel like an ass cause I didn't read this before posting my own unity guide but mine is really just specific to 2D. To my knowledge, this is still the best way to do it with 3D.

(+2)

both of these are great guides, thanks for this guys!

HostSubmitted(+2)

Aye, both great guides, and as they both may serve people differently, I've stickied them both. Thanks for contributing this helpful information!

Submitted

Yeah Pixel Perfect is incredible for 2D - doesn't work so well with 3D though :( it's a little bit of a hack but it works - plus the aspect ratio fitter keeps it within the screen.

Submitted(+1)

Great tutorial! I'm ready to start, thanks guys!

Submitted(+1)

Hello all! Thanks for this lovely guide! 

Just to speed up  even more I want to share this unity package made in Unity 2019.2.0f1

Unity Package on Google Drive: LowRezJam Unity Package 2019.2.0f1

Have fun and good luck everybody :)

Submitted

Amazing! I was considering packaging it up, but didn't have time in the end. Thanks for doing that :)

Submitted

Nice! I will definitely use your canvas setup for my UI! But if you simply use the Pixel Perfect Camera package (download it from the package manager) you don't have to set up all that renderTexture stuff :) It just works out of the box!