ドキュメント

Unity Engine

Unity Engine

Sliced

The SpriteRenderer will render the sprite as a 9-slice image where the corners will remain constant and the other sections will scale.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
Sliced = 1

Remarks

When resizing a 9-sliced sprite the corners will remain unscaled while the other sections will be scaled. Note: For this method to work properly the Sprite assigned to SpriteRenderer.sprite needs to have Sprite.border defined.