[unity] Exposed public SkeletonGraphic.SetScaledPivotOffset method outside of the editor.

This commit is contained in:
Harald Csaszar 2024-12-02 19:44:31 +01:00
parent a6bf66ba32
commit 906793db81
3 changed files with 4 additions and 3 deletions

View File

@ -165,6 +165,7 @@
- `SkeletonRootMotion` components now provide a public `Initialize()` method which is automatically called when calling `skeletonAnimation.Initialize(true)` to update the necessary skeleton references. If a different root bone shall be used, be sure to set `skeletonRootMotion.rootMotionBoneName` before calling `skeletonAnimation.Initialize(true)`.
- Skeleton Mecanim: Added new `Mix Mode` `Match`. When selected, Spine animation weights are calculated to best match the provided Mecanim clip weights. This mix mode is recommended on any layer using blend tree nodes.
- URP Shaders: Added `ZWrite` variant of outline shader `Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly ZWrite`. Suitable for e.g. depth of field (DoF) effect where writing to the depth buffer is required. Note that for DoF effect, `Render Queue` needs to be set to `Alpha Test`.
- SkeletonGraphic: Exposed `SetScaledPivotOffset` as public method outside of the editor to support programatically moving mesh offsets at runtime based on mesh bounds.
- **Breaking changes**

View File

@ -1416,11 +1416,11 @@ namespace Spine.Unity {
public Vector2 GetScaledPivotOffset () {
return pivotOffset * GetLayoutScale(layoutScaleMode);
}
#endif
public void SetScaledPivotOffset (Vector2 pivotOffsetScaled) {
pivotOffset = pivotOffsetScaled / GetLayoutScale(layoutScaleMode);
}
#endif
protected float GetLayoutScale (LayoutMode mode) {
Vector2 currentSize = GetCurrentRectSize();
mode = GetEffectiveLayoutMode(mode);

View File

@ -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.91",
"version": "4.2.92",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",