Merge branch '4.1' into 4.2-beta
@ -191,6 +191,7 @@
|
||||
* Shader macro `RETURN_UNLIT_IF_ADDITIVE_SLOT` in `spine-unity/Shaders/Sprite/CGIncludes/ShaderShared.cginc` has been deprecated and will be removed in spine-unity 4.2. Use RETURN_UNLIT_IF_ADDITIVE_SLOT_TINT instead.
|
||||
|
||||
* **Restructuring (Non-Breaking)**
|
||||
* Moved Spine URP Shaders Examples directory from the main package directory to Samples which can be installed via the Unity Package Manager. To import, select the `Spine Universal RP Shaders` package in the Package Manager window, expand `Samples` at the bottom and hit `Import` next to `Examples`. This follows the standard [samples guideline](https://docs.unity3d.com/Manual/cus-samples.html) and prevents warning messages about unexpectedly altered immutable assets.
|
||||
|
||||
### XNA/MonoGame
|
||||
* **Breaking change**: Removed spine-xna in favor of spine-monogame. See https://github.com/EsotericSoftware/spine-runtimes/issues/1949
|
||||
|
||||
@ -99,8 +99,7 @@ namespace Spine.Unity.Editor {
|
||||
|
||||
Transform transform = skeletonGraphicComponent.transform;
|
||||
Skeleton skeleton = skeletonGraphicComponent.Skeleton;
|
||||
Canvas canvas = skeletonGraphicComponent.canvas;
|
||||
float positionScale = canvas == null ? 1f : skeletonGraphicComponent.canvas.referencePixelsPerUnit;
|
||||
float positionScale = skeletonGraphicComponent.MeshScale;
|
||||
|
||||
if (string.IsNullOrEmpty(boneName.stringValue)) {
|
||||
SpineHandles.DrawBones(transform, skeleton, positionScale);
|
||||
|
||||
@ -139,9 +139,7 @@ namespace Spine.Unity {
|
||||
RectTransform thisTransform = this.transform as RectTransform;
|
||||
if (thisTransform == null) return;
|
||||
|
||||
Canvas canvas = skeletonGraphic.canvas;
|
||||
if (canvas == null) canvas = skeletonGraphic.GetComponentInParent<Canvas>();
|
||||
float scale = canvas != null ? canvas.referencePixelsPerUnit : 100.0f;
|
||||
float scale = skeletonGraphic.MeshScale;
|
||||
|
||||
float additionalFlipScale = 1;
|
||||
if (skeletonTransformIsParent) {
|
||||
|
||||
@ -125,10 +125,7 @@ namespace Spine.Unity {
|
||||
int requiredCollidersCount = 0;
|
||||
PolygonCollider2D[] colliders = GetComponents<PolygonCollider2D>();
|
||||
if (this.gameObject.activeInHierarchy) {
|
||||
Canvas canvas = skeletonGraphic.canvas;
|
||||
if (canvas == null) canvas = skeletonGraphic.GetComponentInParent<Canvas>();
|
||||
float scale = canvas != null ? canvas.referencePixelsPerUnit : 100.0f;
|
||||
|
||||
float scale = skeletonGraphic.MeshScale;
|
||||
foreach (Skin skin in skeleton.Data.Skins)
|
||||
AddCollidersForSkin(skin, slotIndex, colliders, scale, ref requiredCollidersCount);
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ namespace Spine.Unity {
|
||||
#endregion
|
||||
|
||||
AnimationState animationState;
|
||||
Canvas canvas;
|
||||
SkeletonGraphic skeletonGraphic;
|
||||
|
||||
public override Vector2 GetRemainingRootMotion (int trackIndex) {
|
||||
TrackEntry track = animationState.GetCurrent(trackIndex);
|
||||
@ -79,7 +79,7 @@ namespace Spine.Unity {
|
||||
|
||||
protected override float AdditionalScale {
|
||||
get {
|
||||
return canvas ? canvas.referencePixelsPerUnit : 1.0f;
|
||||
return skeletonGraphic ? skeletonGraphic.MeshScale : 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,9 +93,7 @@ namespace Spine.Unity {
|
||||
IAnimationStateComponent animstateComponent = skeletonComponent as IAnimationStateComponent;
|
||||
this.animationState = (animstateComponent != null) ? animstateComponent.AnimationState : null;
|
||||
|
||||
if (this.GetComponent<CanvasRenderer>() != null) {
|
||||
canvas = this.GetComponentInParent<Canvas>();
|
||||
}
|
||||
skeletonGraphic = this.GetComponent<SkeletonGraphic>();
|
||||
}
|
||||
|
||||
protected override Vector2 CalculateAnimationsMovementDelta () {
|
||||
|
||||
@ -483,7 +483,6 @@ namespace Spine.Unity {
|
||||
|
||||
int GetConstraintLastPosIndex (int constraintIndex) {
|
||||
ExposedList<TransformConstraint> constraints = skeletonComponent.Skeleton.TransformConstraints;
|
||||
TransformConstraint targetConstraint = constraints.Items[constraintIndex];
|
||||
return transformConstraintIndices.FindIndex(addedIndex => addedIndex == constraintIndex);
|
||||
}
|
||||
|
||||
|
||||
@ -157,14 +157,13 @@ namespace Spine.Unity {
|
||||
}
|
||||
}
|
||||
|
||||
if (canvas != null) {
|
||||
positionScale = canvas.referencePixelsPerUnit;
|
||||
if (skeletonGraphic != null) {
|
||||
positionScale = skeletonGraphic.MeshScale;
|
||||
}
|
||||
}
|
||||
|
||||
[HideInInspector] public SkeletonRenderer skeletonRenderer;
|
||||
[HideInInspector] public SkeletonGraphic skeletonGraphic;
|
||||
private Canvas canvas;
|
||||
[System.NonSerialized] public ISkeletonAnimation skeletonAnimation;
|
||||
|
||||
private ISkeletonComponent skeletonComponent;
|
||||
@ -233,11 +232,6 @@ namespace Spine.Unity {
|
||||
} else if (skeletonGraphic != null) {
|
||||
skeletonGraphic.OnRebuild -= HandleRendererReset;
|
||||
skeletonGraphic.OnRebuild += HandleRendererReset;
|
||||
canvas = skeletonGraphic.canvas;
|
||||
if (canvas == null)
|
||||
canvas = skeletonGraphic.GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
positionScale = 100.0f;
|
||||
}
|
||||
|
||||
if (skeletonAnimation != null) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.24",
|
||||
"version": "4.2.25",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 412 KiB After Width: | Height: | Size: 412 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 411 KiB After Width: | Height: | Size: 411 KiB |
@ -91,7 +91,7 @@ Material:
|
||||
- _StencilRef: 1
|
||||
- _StraightAlphaInput: 1
|
||||
- _Surface: 0
|
||||
- _ZWrite: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |