-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
56 lines (52 loc) · 1.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en-us">
<head>
<allow-intent href="maps:*" />
<allow-intent href="geo:*" />
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | Test</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
type="text/javascript"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/Build.json", {onProgress: UnityProgress});
function OpenMap(latitude,longitude) {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
window.location = 'google.navigation:q=' + latitude + "," + longitude+ '&mode=d';
}
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
window.open('maps://?q=' + latitude+","+ longitude, '_system');
}
}
function TriggerShare() {
if(navigator.share)
{
navigator.share({
title: "",
text: "",
url: "https://prnt.sc/MVJ0dH8B-Bha",
}).then(() => console.log("share success")).catch((error) => console.log(error));
}
else
{
alert('Sorry. Sharing not available on your device');
}
}
</script>
</head>
<body>
<div class="webgl-content">
<div id="unityContainer" style="width: 960px; height: 600px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="unityInstance.SetFullscreen(1)"></div>
<div class="title">Test</div>
</div>
</div>
</body>
</html>