[unity] Added SPINE_DISABLE_THREADING define to disable threaded animation and mesh generation entirely. Set via 'Scripting Define Symbols'.

This commit is contained in:
Harald Csaszar 2025-11-17 21:31:12 +01:00
parent c4aebc14ab
commit c7c95588f8
9 changed files with 16 additions and 1 deletions

View File

@ -363,6 +363,7 @@
- The same applies to the `TrackEntry.Start`, `Interrupt`, `End`, `Dispose`, `Complete`, and `Event` events. If you need these callbacks to run on the main thread instead of worker threads, you should register them using the corresponding `SkeletonAnimation.MainThreadStart`, `MainThreadInterrupt`, etc. callbacks. Note that this does require a small code change, since these events are **not** automatically unregistered when the `TrackEntry` is removed. Youll need to handle that manually, typically with logic such as `if (trackEntry.Animation == attackAnimation) ..`.
- Added `SkeletonUpdateSystem.Instance.GroupRenderersBySkeletonType` and `GroupAnimationBySkeletonType` properties. Defaults to disabled. Later when smart partitioning is implemented, enabling this parameter might slightly improve cache locality. Until then having it enabled combined with different skeleton complexity would lead to worse load balancing.
- Added previously missing editor drag & drop skeleton instantiation option *SkeletonGraphic (UI) Mecanim* combining components `SkeletonGraphic` and `SkeletonMecanim`.
- Added define `SPINE_DISABLE_THREADING` to disable threaded animation and mesh generation entirely, removing the respective code. This define can be set as `Scripting Define Symbols` globally or for selective build profiles where desired.
- **Deprecated**

View File

@ -43,7 +43,9 @@
#define CONFIGURABLE_ENTER_PLAY_MODE
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_ANIMATION_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -35,7 +35,9 @@
#define BUILT_IN_SPRITE_MASK_COMPONENT
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_ANIMATION_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -43,7 +43,9 @@
#define CONFIGURABLE_ENTER_PLAY_MODE
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_SKELETON_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -35,7 +35,9 @@
#define HAS_CULL_TRANSPARENT_MESH
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_SKELETON_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -43,7 +43,9 @@
#define CONFIGURABLE_ENTER_PLAY_MODE
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_SKELETON_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -47,7 +47,9 @@
#define REVERT_HAS_OVERLOADS
#endif
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_SKELETON_UPDATE
#endif
#if !SPINE_AUTO_UPGRADE_COMPONENTS_OFF
#define AUTO_UPGRADE_TO_43_COMPONENTS

View File

@ -27,8 +27,10 @@
* SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#if !SPINE_DISABLE_THREADING
#define USE_THREADED_SKELETON_UPDATE
#define USE_THREADED_ANIMATION_UPDATE // requires USE_THREADED_SKELETON_UPDATE enabled
#endif
#define READ_VOLATILE_ONCE
#if UNITY_2017_3_OR_NEWER

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 and examples. Spine Examples can be installed via the Samples tab.",
"version": "4.3.29",
"version": "4.3.30",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",