|
@@ -104,27 +104,11 @@ void USpineSkeletonAnimationComponent::InternalTick(float DeltaTime, bool CallDe
|
|
}
|
|
}
|
|
|
|
|
|
void USpineSkeletonAnimationComponent::CheckState () {
|
|
void USpineSkeletonAnimationComponent::CheckState () {
|
|
- bool needsUpdate = lastAtlas != Atlas || lastData != SkeletonData;
|
|
|
|
-
|
|
|
|
- if (!needsUpdate) {
|
|
|
|
- // Are we doing a re-import? Then check if the underlying spine-cpp data
|
|
|
|
- // has changed.
|
|
|
|
- if (lastAtlas && lastAtlas == Atlas && lastData && lastData == SkeletonData) {
|
|
|
|
- spine::Atlas* atlas = Atlas->GetAtlas(false);
|
|
|
|
- if (lastSpineAtlas != atlas) {
|
|
|
|
- needsUpdate = true;
|
|
|
|
- }
|
|
|
|
- if (skeleton && skeleton->getData() != SkeletonData->GetSkeletonData(atlas)) {
|
|
|
|
- needsUpdate = true;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (needsUpdate) {
|
|
|
|
|
|
+ if (lastAtlas != Atlas || lastData != SkeletonData) {
|
|
DisposeState();
|
|
DisposeState();
|
|
|
|
|
|
if (Atlas && SkeletonData) {
|
|
if (Atlas && SkeletonData) {
|
|
- spine::SkeletonData *data = SkeletonData->GetSkeletonData(Atlas->GetAtlas(false), true);
|
|
|
|
|
|
+ spine::SkeletonData *data = SkeletonData->GetSkeletonData(Atlas->GetAtlas(false), false);
|
|
if (data) {
|
|
if (data) {
|
|
skeleton = new (__FILE__, __LINE__) Skeleton(data);
|
|
skeleton = new (__FILE__, __LINE__) Skeleton(data);
|
|
AnimationStateData* stateData = SkeletonData->GetAnimationStateData(Atlas->GetAtlas(false));
|
|
AnimationStateData* stateData = SkeletonData->GetAnimationStateData(Atlas->GetAtlas(false));
|