備忘録
UnityのSpriteEditor上での値と、Spriteクラスのフィールドから取れる値の変換式です。
SpriteEditor | Spriteフィールド |
---|---|
Name | name |
Position | rect |
CustomPivot.x | -bounds.center.x / bounds.size.x + 0.5f |
CustomPivot.y | -bounds.center.y / bounds.size.y + 0.5f |
More than 5 years have passed since last update.
備忘録
UnityのSpriteEditor上での値と、Spriteクラスのフィールドから取れる値の変換式です。
SpriteEditor | Spriteフィールド |
---|---|
Name | name |
Position | rect |
CustomPivot.x | -bounds.center.x / bounds.size.x + 0.5f |
CustomPivot.y | -bounds.center.y / bounds.size.y + 0.5f |
Register as a new user and use Qiita more conveniently