OK I will try that right now
Now I change the code to this:
void callback(AnimationState *state, spine::EventType type, TrackEntry *entry, Event *event)
{
USpineSkeletonAnimationComponent *component = (USpineSkeletonAnimationComponent *) state->getRendererObject();
int TrackIndex = entry->getTrackIndex();
if (entry->getRendererObject())
{
UTrackEntry *uEntry = (UTrackEntry *) entry->getRendererObject();
......
else if (type == EventType_Dispose)
{
component->AnimationDispose.Broadcast(TrackIndex);
uEntry->SetTrackEntry(nullptr);
component->GCTrackEntry(uEntry);
}
}
}
And this did solve the problem Two: "Track Two Entry Invalid after I SetAnimation on Track Two"
I still won't let the uEntry do the broadcast. Current this version should work for my project (althogh the problem One is not located). Thanks for the help!!
Today I find our project DID NOT Add SpinePlugin to our Build.cs file. Thus I think "Name Out Of Range" problem is most likely a performance issue. So if the whole game is eating too much memory, or generating too much cache while looping, or has memory leaking, this problem occurs.
Sorry for reporting this, and thanks for your patience!