Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Unity Camera and Assets

A topic by FrostFyres created Oct 04, 2016 Views: 664 Replies: 7
Viewing posts 1 to 4
Submitted

How would I go about getting the assets I've made in "Aseprite" into Unity and make sure they are of scale / correct dimensions. For some reason the camera no matter the resolution size / image size will not cover the entire screen to what I have saved. My background is 160x144, my character is 32x16 etc. etc. Any help would be greatly appreciated!


P.S. I would love to hear any tips you might have to turn this into a grid based layout so that "spawning" objects at the correct spot and moving the character around is much easier and structured than guestimating.

Unity GBjam Image

Submitted

Hey,

I am also working in Unity, and what I did is set the size of my camera to 72, and made the ratio of pixels to unity units 1, so that moving an object over 1 unit in the scene view will only move the sprite one pixel. That means that if the position of the sprite is an integer value, then the object will appear to be pixel perfect. Also, I was shown a script by Weegiebee: http://pastebin.com/typctTFd. Stick it on your main camera and set the height variable to 144 and it'll force your screen to mimic that resolution!

-Rad

Submitted

Awesome!! Thank you! Also, when you build the project, are you using a 160x144 resolution for your game window to play in as well? Or are you up scaling it?

Submitted

I'm setting the resolution to 160x144, but I have a custom script that switches between different multiples of the resolution.

Submitted

Okay cool!

Submitted (1 edit)

I'm actually having a similar problem as well, although my PPU is set to 1, and my Ortho Camera Size is at 72. Mine is somewhat less severe, as it seems to be only chopping off the bottom row of pixels, but it's still an odd issue.

http://i.imgur.com/7g0hl5P.png

Submitted

Did you import the sprite as multiple, if so check to see if you are getting the entire sprite in the selection.

Submitted (1 edit)

They're all set to Single. Here's a image of my attached settings, although I think the problem isn't with the sprites but more some weird subpixeling with the camera. (The image also shows my Sprite Import settings as well.)

http://i.imgur.com/F5UgBf2.png

Submitted

Weird, it might be the camera, could it be that the object isn't on an integer value, if so the camera might be doing something unwanted with the subpixeling