Thank you so much for the quick responses and fixes!!
I've been fighting with another issue that I'm having a hard time understanding.
To start off the weirdness, here's my temporary fix that worked for a while (called on start)
skeletonAnimation.enabled = false;
MonoBehaviourExtensions.CallWithDelay(this, () =>
{
skeletonAnimation.enabled = true;
}, 0.1f);
For some reason, when I edit one of my prefabs and save them, units now suddenly spawn with no animations playing, like SetAnimation is being called on them but they're just frozen... I can see sometime that they slightly change state when I trigger an animation but it's like nothing actually starts playing, the fix for this that works sometimes is to turn off the SkeletonAnimation and turn it back on. Now even that is inconsistent, sometimes it would work for a few days in then seemingly randomly it would stop working for all units. This doesn't seem to be directly corelated with threading, as turning it on or off doesn't change anything.
A fix that I found that seems to work so far is to completely remove skeletonAnimation component from the prefab, exist and come back in and add it. Out of curiosity I did a diff on the .prefab file to see if I can see anything and here's what I'm seeing
Before
--- !u!114 &8215447342615759975
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7592681743913139351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
updateTiming: 1
threadedAnimation: 2
isUpdatedExternally: 1
animationName:
loop: 0
timeScale: 1
unscaledTime: 0
wasDeprecatedTransferred: 0
skeletonDataAssetDeprecated: {fileID: 0}
initialSkinNameDeprecated:
editorSkipSkinSyncDeprecated: 0
initialFlipXDeprecated: 0
initialFlipYDeprecated: 0
updateModeDeprecated: 3
updateWhenInvisibleDeprecated: 3
separatorSlotNamesDeprecated: []
zSpacingDeprecated: 0
useClippingDeprecated: 1
immutableTrianglesDeprecated: 0
pmaVertexColorsDeprecated: 1
clearStateOnDisableDeprecated: 0
tintBlackDeprecated: 0
singleSubmeshDeprecated: 0
addNormalsDeprecated: 0
calculateTangentsDeprecated: 0
maskInteractionDeprecated: 0
After
--- !u!114 &8777365795840085696
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7592681743913139351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
m_Name:
m_EditorClassIdentifier:
updateTiming: 1
threadedAnimation: 2
isUpdatedExternally: 0
animationName:
loop: 0
timeScale: 1
unscaledTime: 0
With limited knowledge of the internals of Spine, my guess is that isUpdatedExternally being turned on here is the issue - Does the auto upgrade process do that? Assuming that this means that it's expected that a script is going to intiate animation updates rather than them happening every frame, this is not something we ever turned on for any skeleton.
Final note, when this happened the auto upgrade option was turned on... After updating spine it seems to turn itself back on automatically
Again, thank you for all your hard work!