phaser
phaser copied to clipboard
[Bug] setPipeline() seems bugged for Layers and Containers
Version
- Phaser Version: 3.55.2
- Operating system: Windows 10
- Browser: Chrome
Description
Using setPipeline() on a Sprite works, using it on a layer or container doesn't.
Example Test Code
phaser.io/examples/v3/view/renderer/container-pipeline# As seen in this example (you need to use 'Edit' to actually run it), the filter is not applied to the children. If you put the same setPipeline() directly on children though it works.
Additional Information
I'm not 100% sure this is not an intended feature/expected result of latest updates. Either way I can't find any information online on the topic, neither I get replies form the Discord server (I suspect not many people use this feature that much). Another noteworthy thing, as seen here phaser.io/examples/v3/view/game-objects/layer/layer-post-pipeline using setPostPipeline() works as expected.
This is correct as neither of those Game Objects render (both should support Post Pipelines, however).
Although there is an argument that setting it on a Container would force all children to use that pipeline, that's quite an assumption to make.
Leaving this issue open as a reminder for it to throw a runtime warning about using this.
Containers and Layers now have the new PostPipeline
Component which resolves this issue.