Native Preloader - StansAssets/com.stansassets.ultimate-mobile GitHub Wiki

The Native preloader feature gives you the ability to show nice looking native preloader, in case you need to lock the screen and show preloader to a user while you performing an operation in the background.

When you need to lock the screen, just call the LockScreen method:

using SA.CrossPlatform.UI;
...

UM_Preloader.LockScreen();

When you are ready to unlock the screen for a user, just use the method:

using SA.CrossPlatform.UI;
...

UM_Preloader.UnlockScreen();

Here is an example that will lock an app screen for 2 seconds:

using SA.CrossPlatform.UI;
...

UM_Preloader.LockScreen();

SA_Coroutine.WaitForSeconds(2f, () => {
    UM_Preloader.UnlockScreen();
});

Here is how preloader will look like on different platforms:

iOS

Native Preloader

Android

Native Preloader2

Unity Editor

Native Preloader3