Hi - am using V2 engine and looking to add camera effects with the camera-frame class. It generates the error/warning
Writing to the “pc” global is not supported in projects containing ESM Scripts.
To fix this, remove the assignment and import directly from ‘playcanvas’ wherever you need to reference “pc”.
these errors come from the tween class - which is the latest version off the asset store - what is the alternative to this error causing issue below ?
// Add the easing functions to the pc global, ie. pc.SineInOut
Object.assign(globalThis.pc, easing);
If the only issue you’re having is that the asset store version of playcanvas/tween doesn’t work with ESM scripts, and you still want to use the playcanvas tween library, you can just get the ESM compatible version from the project github and upload it to your project: