diff --git a/cocos/core/scene-graph/component-scheduler.ts b/cocos/core/scene-graph/component-scheduler.ts index 7123f4ee73..18bebddc09 100644 --- a/cocos/core/scene-graph/component-scheduler.ts +++ b/cocos/core/scene-graph/component-scheduler.ts @@ -80,7 +80,7 @@ function stableRemoveInactive (iterator, flagToClear) { let next = iterator.i + 1; while (next < array.length) { const comp = array[next]; - if (comp._enabled && comp.node._activeInHierarchy) { + if (comp.node._activeInHierarchy) { ++next; } else { iterator.removeAt(next); diff --git a/cocos/particle-2d/particle-system-2d.ts b/cocos/particle-2d/particle-system-2d.ts index 87a261b787..8c9d2815a8 100644 --- a/cocos/particle-2d/particle-system-2d.ts +++ b/cocos/particle-2d/particle-system-2d.ts @@ -673,15 +673,6 @@ export class ParticleSystem2D extends Renderable2D { public declare _renderSpriteFrame: SpriteFrame | null; public declare _simulator: Simulator; - /** - * @en Play particle in edit mode. - * @zh 在编辑器模式下预览粒子,启用后选中粒子时,粒子将自动播放。 - */ - @serializable - @editable - @tooltip('i18n:particle_system.preview') - private preview = true; - /** * @en If set to true, the particle system will automatically start playing on onLoad. * @zh 如果设置为 true 运行时会自动发射粒子。 @@ -689,7 +680,7 @@ export class ParticleSystem2D extends Renderable2D { @serializable @editable @tooltip('i18n:particle_system.playOnLoad') - private playOnLoad = true; + public playOnLoad = true; /** * @en Indicate whether the owner node will be auto-removed when it has no particles left. @@ -698,8 +689,16 @@ export class ParticleSystem2D extends Renderable2D { @serializable @editable @tooltip('i18n:particle_system.autoRemoveOnFinish') - private autoRemoveOnFinish = false; + public autoRemoveOnFinish = false; + /** + * @en Play particle in edit mode. + * @zh 在编辑器模式下预览粒子,启用后选中粒子时,粒子将自动播放。 + */ + @serializable + @editable + @tooltip('i18n:particle_system.preview') + private preview = true; @serializable private _custom = false; @serializable