Pixels per Unit are resetting on play

So I imported a sprite and wanted to make it smaller so I bumped up the pixels per unit to 1200 and it looks fine, but whenever I run the game, the sprite shows in full size at 100 pixels per unit.

How can I keep the size that I need?


Did you press “apply” in the sprite import settings after making changes?

Also make sure to only make the changes while the game isn’t running. I know that serialized values in Unity reset if you change them in play mode, and this behavior may or may not happen when changing pixels per unit values. Not sure, not an expert.

Yup, I hit apply and I do the changes out of play mode. Still getting this enlarged character

Ok for some reason the animator is causing this, when it’s off the character remains at the same size. Any ideas?

While in play mode, have you gone back to the import settings to confirm that the setting has, in fact, reverted to 100?

I notice a warning message in your import settings. Is that something you can make go away? I wonder if that could have anything to do with it.

Otherwise, try making an empty scene (or, bettet yet, an empty project). Create a single sprite in the scene, assign this sprite, and enter play mode. If everything works as expected, it suggests that something in your main scene/project is causing the unexpected behavior. It might take a bit of deduction to figure out what that “something” us, but at least we would know it’s not Unity acting up or anything.

EDIT: Oops, you posted while I was posting. Unfortunately I know nothing about the Animator component. Is it a Unity component or something custom?

At least you’re closer to a solution!

Thanks, might put it in a new scene and see where that takes me

Another way I went at it made my sprite appear above the colliders, as shown in the pictures below, which makes my character float in the air.

Top is on play, bottom is outside play mode.

Any idea what might be causing this?

Again, with the Animator component attached, it’s hard for me to know for sure, since I haven’t used that component yet. One idea would be making sure the sprite’s pivot is correct for your purposes. Another idea is, if the sprite is its own GameObject, existing as a child of the main Player GameObject (a common practice, if I understand correctly), its position might have gotten messed up at some point. If you are using that child-sprite setup, you probably want the sprite’s position to be zeroed out, so that it doesn’t appear offset from the main Player GameObject.