Startup and Shutdown functions

A shared folder with AI prompts and code snippets

From workspace: Nvidia

Team: Omniverse

Total snippets: 2

Nvidia

Startup and Shutdown functions

2 snippets

On Shutdown

Called when your Extension is being unloaded. This is where you do any clean up tasks like closing open files, unsubscribing from events, etc…

def on_shutdown(self): print("[ui.demo.ext] ui demo ext shutdown") self.unsubscribe_from_events()

On Startup

Called when your Extension is loaded and passed its Extension ID. This is typically where your extension will create its UI and any other startup tasks that are needed.

# ext_id is current extension id. It can be used with extension manager to query additional information, like where # this extension is located on filesystem. def on_startup(self, ext_id): print("[ui.demo.ext] ui demo ext startup") ...

Nvidia - Startup and Shutdown functions - AI Prompts & Code Snippets | Snippets AI