Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spine can not be paused while working at realTime mode #16672

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

bofeng-song
Copy link
Contributor

@bofeng-song bofeng-song commented Jan 9, 2024

Re: #
#16661
cocos/cocos-engine-external#450

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@@ -34,7 +33,6 @@ static void trackEntryCallback(AnimationState *state, EventType type, TrackEntry

SpineSkeletonInstance::SpineSkeletonInstance() {
_model = new SpineModel();
SpineSkeletonSystem::addSpineInstance(this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete SpineSkeletonSystem ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its no need an additional helper class to release the spineSkeletonInstance object.

Copy link

github-actions bot commented Jan 9, 2024

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -52001,8 +52001,9 @@
                 isCache: boolean;
                 isDelete: boolean;
                 enable: boolean;
                 setTrackEntryListener: any;
+                destroy();
                 initSkeleton(data: SkeletonData);
                 getAnimationState();
                 setAnimation(trackIndex: number, name: string, loop: boolean): spine.TrackEntry | null;
                 setSkin(name: string);
@@ -52204,9 +52205,9 @@
             protected _debugSlots: boolean;
             protected _enableBatch: boolean;
             protected _runtimeData: spine.SkeletonData | null;
             _skeleton: spine.Skeleton;
-            protected _instance: spine.SkeletonInstance;
+            protected _instance: spine.SkeletonInstance | null;
             protected _state: spine.AnimationState;
             protected _textures: Texture2D[];
             protected _animationName: string;
             protected _skinName: string;
@@ -67448,9 +67449,9 @@
             model: _cocos_spine_skeleton_cache__SpineModel;
             boneInfos: _cocos_spine_skeleton_cache__FrameBoneInfo[];
         }
         export class _cocos_spine_skeleton_cache__AnimationCache {
-            protected _instance: sp.spine.SkeletonInstance;
+            protected _instance: sp.spine.SkeletonInstance | null;
             protected _state: sp.spine.AnimationState;
             protected _skeletonData: sp.spine.SkeletonData;
             protected _skeleton: sp.spine.Skeleton;
             _privateMode: boolean;

@minggo minggo merged commit ddd45f9 into cocos:v3.8.2 Jan 10, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants