Outline & Entity Outline Not Working After ES5 → ES6 Update in PlayCanvas

It seems that the outline and entity outline functionality in PlayCanvas has been updated because when I tried running the outline in my project today, it wasn’t working, whereas previously everything was working fine. I found out through ChatGPT that it has been updated from ES5 to ES6. That’s why it isn’t working. Can you suggest a solution? It is already added in my project.

@KPal @yaustar @will @Albertos @mvaligursky

What’s the project URL?

I think we finally need to update all those scripts to use classes and inheritance, instead of the prototype based solution that were needed for ES5.

my project is private I will add you in my project @mvaligursky @will

I added you successfully in my project please check my issue and problems

Looks like you switched the project from Engine V1 to Engine V2. Engine V2 is not compatible with the legacy post effect scripts.

Alright, then please help me resolve my issue

Either:
a) Switch back to Engine V1 in the Editor Settings.
b) Upgrade your outline post effect script to work with Engine V2.

Please switch to Engine V1 so that my code starts working properly

It’s here:

image

one more thing I want to ask

By the way, if your project was already using the engine V2, I’d suggest you keep it, instead of switching to V1, which might cause more compatibility issues.

I’m just updating those post-effects to be compatible with recent changes, and will ping back within an hour with updated versions you can use with engine V2.

I updated those scripts, see Modernize legacy posteffect scripts to ES6 classes and fix FXAA offset bug by mvaligursky · Pull Request #8397 · playcanvas/engine · GitHub

you can download them from here: engine/scripts/posteffects at mv-posteffect-scripts-es6 · playcanvas/engine · GitHub



Switch to V2, replace the script, launch the project, and this is the result

I created a simple test project to use this new script and render outline based on a fixed ring texture, and all works:
https://playcanvas.com/project/1456970/overview/old-outline-tets

I also updated those scripts in the Asset Store, so you can get them from there too now.