• Unity
  • Exact Size under Unity 2D Ortographic Camera

Related Discussions
...

Hello, I have a screen height target of 1080px and a Spine character 230px tall.
In Unity, for simplicity reasons, I set background image's PixelPerUnit=1 and Camera size=540.
Now, I cant tell why my just imported character is only a dot in the screen.... :think:
The scale of the character is set to 0.01 (default), but playing with the number is not giving any visual difference.
Any tip?
Thak you

Did you click 'reload' on the spine animation object in Unity after changing the scale value?

The scale property on the SkeletonData asset is applied at load time.
So you need to click Reload to see the changes.

If you want to match the 1 pixel per unit, you'll want a scale of 1.
Note that Unity Technologies doesn't recommend these values because their built-in 2D and 3D physics operate on a unit meter scale and has a number of default assumptions that may not hold true when your scale is very large (eg. 100x large).

No... where do I click?

By the
way, my question is about the pixel size: if I import a new Spine object, shouldn't it be rightly sized? :think:


25 Apr 2017, 12:26


Pharan wrote

If you want to match the 1 pixel per unit, you'll want a scale of 1.
Note that Unity Technologies doesn't recommend these values because their built-in 2D and 3D physics operate on a unit meter scale and has a number of default assumptions that may not hold true when your scale is very large (eg. 100x large).

Ok got it, but I'm not using any physics from unity, because I'm integrating Spine with Platformer PRO, that uses its own physic.

Anyway it's not clear to me what is the meaning of size=0.01 as Default scale value: why not just 1 instead?

Spine saves pixel scale. Textures/images are saved in pixel scale.
Unity uses meter scale.

Spine-Unity's default scale 0.01 is there to match Unity's Sprite system's 100 pixels per unit default.
The end result is that Unity Sprites and Spine Skeletons have the same scale by default and can be used next to each other by default.