mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 13:19:08 +08:00
Merge branch '4.2' into spine-android
This commit is contained in:
commit
fc7f2f96b2
@ -93,6 +93,7 @@ namespace Spine.Unity {
|
|||||||
/// <summary>Offset relative to the pivot position, before potential layout scale is applied.</summary>
|
/// <summary>Offset relative to the pivot position, before potential layout scale is applied.</summary>
|
||||||
[SerializeField] protected Vector2 pivotOffset = Vector2.zero;
|
[SerializeField] protected Vector2 pivotOffset = Vector2.zero;
|
||||||
[SerializeField] protected float referenceScale = 1f;
|
[SerializeField] protected float referenceScale = 1f;
|
||||||
|
[SerializeField] protected float layoutScale = 1f;
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
protected LayoutMode previousLayoutScaleMode = LayoutMode.None;
|
protected LayoutMode previousLayoutScaleMode = LayoutMode.None;
|
||||||
[SerializeField] protected Vector2 rectTransformSize = Vector2.zero;
|
[SerializeField] protected Vector2 rectTransformSize = Vector2.zero;
|
||||||
@ -742,8 +743,9 @@ namespace Spine.Unity {
|
|||||||
SetRectTransformSize(submeshGraphic, size);
|
SetRectTransformSize(submeshGraphic, size);
|
||||||
submeshGraphic.rectTransform.pivot = p;
|
submeshGraphic.rectTransform.pivot = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.referenceSize = size;
|
this.referenceSize = size;
|
||||||
|
referenceScale = referenceScale * layoutScale;
|
||||||
|
layoutScale = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetRectTransformSize (Graphic target, Vector2 size) {
|
public static void SetRectTransformSize (Graphic target, Vector2 size) {
|
||||||
@ -943,7 +945,7 @@ namespace Spine.Unity {
|
|||||||
meshScale = (canvas == null) ? 100 : canvas.referencePixelsPerUnit;
|
meshScale = (canvas == null) ? 100 : canvas.referencePixelsPerUnit;
|
||||||
if (layoutScaleMode != LayoutMode.None) {
|
if (layoutScaleMode != LayoutMode.None) {
|
||||||
meshScale *= referenceScale;
|
meshScale *= referenceScale;
|
||||||
float layoutScale = GetLayoutScale(layoutScaleMode);
|
layoutScale = GetLayoutScale(layoutScaleMode);
|
||||||
if (!EditReferenceRect) {
|
if (!EditReferenceRect) {
|
||||||
meshScale *= layoutScale;
|
meshScale *= layoutScale;
|
||||||
}
|
}
|
||||||
@ -1043,7 +1045,7 @@ namespace Spine.Unity {
|
|||||||
meshScale = (canvas == null) ? 100 : canvas.referencePixelsPerUnit;
|
meshScale = (canvas == null) ? 100 : canvas.referencePixelsPerUnit;
|
||||||
if (layoutScaleMode != LayoutMode.None) {
|
if (layoutScaleMode != LayoutMode.None) {
|
||||||
meshScale *= referenceScale;
|
meshScale *= referenceScale;
|
||||||
float layoutScale = GetLayoutScale(layoutScaleMode);
|
layoutScale = GetLayoutScale(layoutScaleMode);
|
||||||
if (!EditReferenceRect) {
|
if (!EditReferenceRect) {
|
||||||
meshScale *= layoutScale;
|
meshScale *= layoutScale;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core.",
|
"description": "This plugin provides the spine-unity runtime core.",
|
||||||
"version": "4.2.78",
|
"version": "4.2.79",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user