Usage Examples
Notification Duration
By default, a notification will auto hide after 3 seconds.
The duration could be customized as:
import omni.kit.notification_manager as nm
# Auto hide notification 5 seconds later
nm.post_notification("This is a simple notification.", duration=5)
If required, notification could be there as:
import omni.kit.notification_manager as nm
# Do not auto hide notification.
# Instead, show a Dismiss button for user to close is manually.
nm.post_notification("This is a simple notification.", hide_after_timeout=False)
Notification Status
By default, notification is shown as information.
Warning notification with different icon and background color is also supported:
import omni.kit.notification_manager as nm
# Show as warning
nm.post_notification("This is a warning notification.", status=nm.NotificationStatus.WARNING)