Skip to content

Unregister the system / unload effects #216

@illiu-maker

Description

@illiu-maker

Hello,
I'm stuck on some silly detail. I have a postprocessing system registered this way.

load().then((assets) => { AFRAME.registerSystem("postprocessing", postprocessingSystem.setAssets(assets)); }).catch(console.error);

The script is called by a component in an A-frame .

I need to remove the component under certain actions and its effects at the same time.

-First problem: postprocessing remains active.
-second problem: if I reactivate it for the second time I logically get:

Error: The system postprocessing has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name. at Object.module.exports.registerSystem (system.js:143) at (index):668

Question: what is the method to return to withdraw the system or the effects?

Thank you in advance,
Ludovic

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions