Camera Permission Message

Hi
I am building a web ar experience with unity and have a question
is it possible to change the camera permission message to French for example ?

Hello @ira,

I am afraid you can’t directly edit the permission’s screen text!

However, you can edit the existing WebGL template with your own splash/HTML elements requesting for permissions and uncheck the Permission UI(WebGL) from UAR Settings in Unity Project.
image

Regards,

1 Like

Thanks for the feedback @Shubham

Do you have some html template that could help with that ?
Having some problems with iOS permissons

Hello @ira,

Here’s a zip containing permission.js and index.html (PFA). The permission.js script injects the custom permission UI with French translation (done using google translate). Feel free to customize this as per your requirement.
custom_permission.zip (2.9 KB)

Please note that index.html is based on Zappar WebGLTemplate (meant for Unity 2020.x and above) and references the permission.js in relative path w.r.t itself. Otherwise you can follow these steps to update your Unity build:

  1. Replace WaitForZCVload(); in index.html at line 172 with following:
   //WaitForZCVLoad();
	custom_permission_request_ui_async(PermissionResolve);
	function PermissionResolve(success) {
		console.log("permission allowed: "+success);
		if(success)
			WaitForZCVLoad();
	}
  1. Insert the following line somewhere in your index.html before the main script block, preferably after zappar-cv.js or in head block. And update the src attribute suitable to your project setup.

<script type="text/javascript" src="permission.js"></script>

Hopefully that’s helpful.

Cheers,

2 Likes