how would I manage to let two different extensions (
B) talk to each other? I would like to use the member function
foo of extension
A from within function
bar in extension
B. How would I do that? To be specific, I would like to access the already running instance of Extension
A. I don’t want to create a new instance of
Example / more details:
- can spawn prims on the stage.
- maintains a list of all the prims that were created with Extension
foo: using that list, Extension
A can delete all the prims, that it once spawned on the stage.
bar: needs call the
foo function of
A so that all the prims are deleted that were created by the running instance of Extension
Hi @markus-franz.ziegler. There are lots of different ways that you can implement interactions between two extensions. The way you describe is just one of them, so I thought I’d list out a few different options for you though maybe not all of them are appropriate for your specific use case.
- Make Extension A a singleton. See
omni.kit.window.file_importer’s implementation for an example. (This is specifically what you were asking about).
- Call a Kit Command that Extension A defines.
- Call a Kit Action that Extension A defines.
- Have Extension A listen for a custom event and have Extension B trigger the event: Events — Omniverse Kit documentation
- Have Extension A listen for a custom setting change and have Extension B change the setting.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.