@pNik_Dev
Add a DIV in your HTML that has absolute position and covers the Unity canvas.
I put a message in that div that says “Waiting for camera” and display it after the loader has completed. Add a custom .jslib file in your Unity Plugins folder (alongside the existing zcv.jslib) that contains this code:
mergeInto(LibraryManager.library, {
JSCameraReady: function () {
onCameraReady();
}
});
Then make your own copy of ZapparCameraBackground.cs, switch the Zappar Camera Background object to use your script instead of Zappar’s. Then edit your script to add:
private bool cameraIsReady = false;
[DllImport("__Internal")]
public static extern void JSCameraReady();
and where the code checks for valid texture, replace with:
if (m_currentTexture != null) {
cameraMaterial.mainTexture = m_currentTexture;
// notify the browser that the camera is ready
if (!cameraIsReady) {
cameraIsReady = true;
#if !UNITY_EDITOR
JSCameraReady();
#endif
}
}
Now the background camera will call a JavaScript method called onCameraReady() when the camera texture is ready, and you can add that JS method to your index.html template to hide your HTML DIV that covers the Unity canvas.
This solution allows you to display anything you want in the HTML while you wait for the AR Camera to be ready.