• Bugs
  • spine timeline extensions. ArgumentOutOfRangeException

Related Discussions
...

Hello there! Out team is using spine to create animations for some of our cutscenes. Right now we are facing an exception with spine objects which use multiple atlas pages. When both ActivationTrack and SpineAnimationStateGraphicTrack start playing at the same frame, it throws an ArgumentOutOfRangeException. As far as I understood the reason for such behaviour is that Spine clip requires an object to be fully initialized before it can do something with it (objects which use multiple atlas pages are trying to sync canvas renderes and raw images). But for some reason ActivationTrack is getting execute after the spine track, and exception occurs. In some situations we've managed to solve it by simply shifting the spine clip by a frame in timeline, hovewer, because we have a skip functionality for some parts of a cutscene, it sometimes leads to an edge cases when after skipping, we jump to a frame that also has both Activation and Spine clip. We've tried to rearrange an order of tracks in timeline, but that did not help.

For now we were able to resolve an issue by implementing our custom Mixer Behaviour, which is basically a full copy of a SpineAnimationStateMixerBehaviour from the spine timeline extensions package, but with the code, that also calls Awake for the SkeletonGraphic object.

I've attached an exception stacktrace. Thank you for your help

spine-unity plugin version: 3.8.0
spine timeline extensions version: 3.8.2
unity version: 2020.3.17f1
timeline version: 1.5.6

This is somewhat strange as SkeletonGraphic: line 650 means it fails with the separatorParts list being empty:
https://github.com/EsotericSoftware/spine-runtimes/blob/3.8/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonGraphic.cs#L650
However, this list is serialized so it should be populated with your saved state. You could check if you have maybe saved the scene in a state where the separatorParts were not setup yet but separatorSlots already contains an entry, which is an inconsistent state.

Apart from that, you could also fix the problem easily by changing the line as follows:

Transform parent = (this.separatorSlots.Count == 0 || this.separatorParts.Count == 0) ? this.transform : this.separatorParts[0];

Unfortunately I'm afraid we don't do bugfixes for 3.8 any more, but you can thus safely modify any code, knowing that it won't be overwritten by future updates.

Another way would be to initialize the SkeletonGraphic object via a separate script independently before any Timeline activation event.

Okay, i'm not sure why, but for me line 650 looks like this

Your runtime is not the latest.

Alright, after update the exception is now gone, thank you!