mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
f56086826b
@ -180,6 +180,7 @@
|
||||
If you are using `SkeletonRenderSeparator` and need to enable and disable the `SkeletonRenderSeparator` component at runtime, you can increase the `RenderCombinedMesh` `Reference Renderers` array by one and assign the `SkeletonRenderer` itself at the last entry after the parts renderers. Disabled `MeshRenderer` components will be skipped when combining the final mesh, so the combined mesh is automatically filled from the desired active renderers.
|
||||
* Timeline extension package: Added static `EditorEvent` callback to allow editor scripts to react to animation events outside of play-mode. Register to the events via `Spine.Unity.Playables.SpineAnimationStateMixerBehaviour.EditorEvent += YourCallback;`.
|
||||
* URP Shaders: Added `Depth Write` property to shaders `Universal Render Pipeline/Spine/Skeleton` and `Universal Render Pipeline/Spine/Skeleton Lit`. Defaults to false to maintain existing behaviour.
|
||||
* Added `Animation Update` mode (called `UpdateTiming` in code) `In Late Update` for `SkeletonAnimation`, `SkeletonMecanim` and `SkeletonGraphic`. This allows you to update the `SkeletonMecanim` skeleton in the same frame that the Mecanim Animator updated its state, which happens between `Update` and `LateUpdate`.
|
||||
|
||||
* **Breaking changes**
|
||||
* Made `SkeletonGraphic.unscaledTime` parameter protected, use the new property `UnscaledTime` instead.
|
||||
|
||||
@ -273,8 +273,12 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
public override void LateUpdate () {
|
||||
if (updateTiming == UpdateTiming.InLateUpdate && valid)
|
||||
Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
|
||||
|
||||
// instantiation can happen from Update() after this component, leading to a missing Update() call.
|
||||
if (!wasUpdatedAfterInit) Update(0);
|
||||
|
||||
base.LateUpdate();
|
||||
}
|
||||
|
||||
|
||||
@ -415,6 +415,9 @@ namespace Spine.Unity {
|
||||
if (freeze) return;
|
||||
if (updateMode != UpdateMode.FullUpdate) return;
|
||||
|
||||
if (updateTiming == UpdateTiming.InLateUpdate)
|
||||
Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
|
||||
|
||||
PrepareInstructionsAndRenderers();
|
||||
|
||||
SetVerticesDirty(); // triggers Rebuild and avoids potential double-update in a single frame
|
||||
|
||||
@ -167,6 +167,8 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
public override void LateUpdate () {
|
||||
if (updateTiming == UpdateTiming.InLateUpdate && valid)
|
||||
UpdateAnimation();
|
||||
// instantiation can happen from Update() after this component, leading to a missing Update() call.
|
||||
if (!wasUpdatedAfterInit) Update();
|
||||
base.LateUpdate();
|
||||
|
||||
@ -40,7 +40,8 @@ namespace Spine.Unity {
|
||||
public enum UpdateTiming {
|
||||
ManualUpdate = 0,
|
||||
InUpdate,
|
||||
InFixedUpdate
|
||||
InFixedUpdate,
|
||||
InLateUpdate
|
||||
}
|
||||
|
||||
public delegate void ISkeletonAnimationDelegate (ISkeletonAnimation animated);
|
||||
|
||||
@ -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.26",
|
||||
"version": "4.2.27",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user