question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unregister the system / unload effects

See original GitHub issue

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 <a-entity>.

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
illiu-makercommented, Aug 3, 2020

I will try this way 😃 thanks you

1reaction
vanruesccommented, Aug 2, 2020

Hi,

the a-frame example is pretty much just a hacky proof of concept that doesn’t really harmonize with a-frame. I don’t think it’s possible to unregister systems in a-frame anymore, but you could add custom enable/disable logic: https://jsfiddle.net/537osy0q/.

A proper solution would probably consist of a more integrated post processing System with pass and effect Components.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dlclose doesn't really unload shared object, no matter how ...
My question is, what are the possible reasons for my shared object not being unloaded after dlclose , given that my dlopen calls...
Read more >
How to unload a shell extension dll from Explorer? - MSDN
Hi all, I'm developing a shell extension that adds a context menu item to explorer. In DllRegisterServer and DllUnregisterServer I have the ...
Read more >
Consequences of unloading at termination / explicitly.
AtTermination - DLL is unloaded when NX Closes. Everything is fine as long as you don't want to unload the library without closing...
Read more >
Destroying lazy loaded modules doesn't unload them #24962
I expect lazy modules to unload themselves once destroyed, re-initializing themselves when they're needed again.
Read more >
How do I prevent a kernel module from loading automatically?
[ step1 ] First we unload the module from the running system if it ... for other specific hardware, there might be unexpected...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found