Usage Examples#

Display and Hide a Splash Image#

import asyncio
import omni.splash

async def show_splash():
    # Acquire the splash screen interface
    splash_interface = omni.splash.acquire_splash_screen_interface()

    # Create a splash image
    splash = splash_interface.create("${resources}/splash/splash.png", 1.0)

    # Show the splash image
    splash_interface.show(splash)

    for _ in range(3):
        await omni.kit.app.get_app().next_update_async()
    # Check if the splash image is valid
    print(splash_interface.is_valid(splash))

    # Close the splash image
    for _ in range(3):
        await omni.kit.app.get_app().next_update_async()
    splash_interface.close(splash)

asyncio.ensure_future(show_splash())