You are right, the intermediate code is missing in the other thread. You need to access the director's playableGraph
as follows:
PlayableDirector director = this.GetComponent<PlayableDirector>();
int rootCount = director.playableGraph.GetRootPlayableCount();
for (int r = 0; r < rootCount; ++r) {
Playable rootPlayable = director.playableGraph.GetRootPlayable(r);
int trackCount = rootPlayable.GetInputCount();
for (int t = 0; t < trackCount; ++t) {
var trackPlayable = rootPlayable.GetInput(t);
if (trackPlayable.GetPlayableType() == typeof(SpineAnimationStateMixerBehaviour)) {
//ScriptPlayable<SpineAnimationStateMixerBehaviour> behaviour = (ScriptPlayable<SpineAnimationStateMixerBehaviour>)mixerPlayable;
int clipCount = trackPlayable.GetInputCount();
for (int c = 0; c < clipCount; ++c) {
var clipPlayable = trackPlayable.GetInput(c);
if (clipPlayable.GetPlayableType() == typeof(SpineAnimationStateBehaviour)) {
ScriptPlayable<SpineAnimationStateBehaviour> stateClip = (ScriptPlayable<SpineAnimationStateBehaviour>)clipPlayable;
SpineAnimationStateBehaviour animationStateClip = stateClip.GetBehaviour();
Debug.Log(string.Format("track {0}, clip {1}: {2}", t, c, animationStateClip.animationReference.name));
}
}
}
}
}