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

Add editor api: isEmbeddedPlayableMountedUnderBone #15537

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions editor/exports/embedded-player.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import { EmbeddedAnimationClipPlayable } from '../../cocos/animation/embedded-player/embedded-animation-clip-player';
import { EmbeddedParticleSystemPlayable } from '../../cocos/animation/embedded-player/embedded-particle-system-player';
import { EmbeddedPlayable } from '../../cocos/animation/embedded-player/embedded-player';
import { warn } from '../../exports/base';

export {
embeddedPlayerCountTag,
getEmbeddedPlayersTag,
Expand All @@ -10,6 +15,16 @@ export { EmbeddedPlayer } from '../../cocos/animation/embedded-player/embedded-p

export type { EmbeddedPlayable } from '../../cocos/animation/embedded-player/embedded-player';

export { EmbeddedParticleSystemPlayable } from '../../cocos/animation/embedded-player/embedded-particle-system-player';
export { EmbeddedParticleSystemPlayable };

export { EmbeddedAnimationClipPlayable };

export { EmbeddedAnimationClipPlayable } from '../../cocos/animation/embedded-player/embedded-animation-clip-player';
export function isEmbeddedPlayableMountedUnderBone(playable: EmbeddedPlayable) {
if (playable instanceof EmbeddedAnimationClipPlayable ||
playable instanceof EmbeddedParticleSystemPlayable) {
return true;
} else {
warn(`Unrecognized playable`, playable);
return false;
}
}