@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:6d7b72510c56d1d1adc4dc2473034b884e8b831978ca1efc7ad50b536157b696 | |||||
size 508 | |||||
oid sha256:bb2f97ea3a07f0b8f8e7cb0dff6e4bfef283dc0c83b8ec9d9cc81d77319661cc | |||||
size 527 |
@ -0,0 +1,20 @@ | |||||
mergeInto(LibraryManager.library, { | |||||
GetURLFromPage: function () { | |||||
var returnStr = window.top.location.href; | |||||
var bufferSize = lengthBytesUTF8(returnStr) + 1 | |||||
var buffer = _malloc(bufferSize); | |||||
stringToUTF8(returnStr, buffer, bufferSize); | |||||
return buffer; | |||||
}, | |||||
GetQueryParam: function(paramId) { | |||||
var urlParams = new URLSearchParams(location.search); | |||||
var param = urlParams.get(Pointer_stringify(paramId)); | |||||
console.log("JavaScript read param: " + param); | |||||
var bufferSize = lengthBytesUTF8(param) + 1; | |||||
var buffer = _malloc(bufferSize); | |||||
stringToUTF8(param, buffer, bufferSize); | |||||
return buffer; | |||||
} | |||||
}); |
@ -0,0 +1,36 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c24c76f5a4dd09e438c024cb8078f81a | |||||
PluginImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
iconMap: {} | |||||
executionOrder: {} | |||||
defineConstraints: [] | |||||
isPreloaded: 0 | |||||
isOverridable: 0 | |||||
isExplicitlyReferenced: 0 | |||||
platformData: | |||||
- first: | |||||
Any: | |||||
second: | |||||
enabled: 0 | |||||
settings: {} | |||||
- first: | |||||
Editor: Editor | |||||
second: | |||||
enabled: 0 | |||||
settings: | |||||
DefaultValueInitialized: true | |||||
- first: | |||||
Facebook: WebGL | |||||
second: | |||||
enabled: 1 | |||||
settings: {} | |||||
- first: | |||||
WebGL: WebGL | |||||
second: | |||||
enabled: 1 | |||||
settings: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: f6caae32d463529478f2186f47c2e3fe | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,13 @@ | |||||
mergeInto(LibraryManager.library, { | |||||
focusHandleAction: function(_name, _str){ | |||||
if(UnityLoader.SystemInfo.mobile == true){ | |||||
var _inputTextData = prompt("", Pointer_stringify(_str)); | |||||
if (_inputTextData == null || _inputTextData == "") { | |||||
//canceled text | |||||
} else { | |||||
//send data to unity | |||||
SendMessage(Pointer_stringify(_name), 'ReceiveInputData', _inputTextData); | |||||
} | |||||
} | |||||
}, | |||||
}); |
@ -0,0 +1,36 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 9a2f32da2f4130346bc1f7e0b221f5c3 | |||||
PluginImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
iconMap: {} | |||||
executionOrder: {} | |||||
defineConstraints: [] | |||||
isPreloaded: 0 | |||||
isOverridable: 0 | |||||
isExplicitlyReferenced: 0 | |||||
platformData: | |||||
- first: | |||||
Any: | |||||
second: | |||||
enabled: 0 | |||||
settings: {} | |||||
- first: | |||||
Editor: Editor | |||||
second: | |||||
enabled: 0 | |||||
settings: | |||||
DefaultValueInitialized: true | |||||
- first: | |||||
Facebook: WebGL | |||||
second: | |||||
enabled: 1 | |||||
settings: {} | |||||
- first: | |||||
WebGL: WebGL | |||||
second: | |||||
enabled: 1 | |||||
settings: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 296bd90e667df1f4697823a0aa45acf0 | |||||
guid: be25a323ad5fce04d9ff37db05f30f0c | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -0,0 +1,51 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
using UnityEngine.UI; | |||||
using UnityEngine.EventSystems; | |||||
using System.Runtime.InteropServices; | |||||
using System; | |||||
public class WebGLKeyboard : MonoBehaviour, ISelectHandler | |||||
{ | |||||
[DllImport("__Internal")] | |||||
private static extern void focusHandleAction(string _name, string _str); | |||||
private InputField UnityInput; | |||||
private TMPro.TMP_InputField TMPInput; | |||||
private void Awake() | |||||
{ | |||||
UnityInput = GetComponent<InputField>(); | |||||
TMPInput = GetComponent<TMPro.TMP_InputField>(); | |||||
} | |||||
public void ReceiveInputData(string value) | |||||
{ | |||||
if (TMPInput != null) | |||||
TMPInput.text = value; | |||||
else if (UnityInput != null) | |||||
UnityInput.text = value; | |||||
} | |||||
public void OnSelect(BaseEventData data) | |||||
{ | |||||
#if UNITY_WEBGL | |||||
try | |||||
{ | |||||
if (TMPInput != null) | |||||
focusHandleAction(gameObject.name, TMPInput.text); | |||||
else if (UnityInput != null) | |||||
focusHandleAction(gameObject.name, UnityInput.text); | |||||
} | |||||
catch (Exception error) { } | |||||
#endif | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 516583a80931657498c305160bf48997 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 3d7d7a61a5341904eb3c65af025b1d86 | |||||
guid: 8d7394d70ec233849a60a26da5f23b75 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -1,8 +0,0 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8936b441d7647f74884c94f97bfb8931 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 7dbc36665bc0d684db9a4447e27a7a4b | |||||
guid: d14f9a69828e04f409637bb2e92a0185 | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -1,5 +1,5 @@ | |||||
fileFormatVersion: 2 | fileFormatVersion: 2 | ||||
guid: 860c08388401a6d4e858fe4910ea9337 | |||||
guid: d24495022ea62b74dbe9a344a7b25e9b | |||||
folderAsset: yes | folderAsset: yes | ||||
DefaultImporter: | DefaultImporter: | ||||
externalObjects: {} | externalObjects: {} |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 2e554f8cda74fad42ad122eda682d0f5 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b6b0927c5ed2795479fa9fae16cfd9b2 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:d3b63b387237263b0d53dd2426329f9badf2795062af614a355597e3a2b0c2c6 | |||||
size 12036029 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a1e435c2e0133c54a90809ecd4fda57d | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,13 @@ | |||||
{ | |||||
"companyName": "Pet.Move()", | |||||
"productName": "Pet.Move()", | |||||
"dataUrl": "WebGLBuild.data.unityweb", | |||||
"wasmCodeUrl": "WebGLBuild.wasm.code.unityweb", | |||||
"wasmFrameworkUrl": "WebGLBuild.wasm.framework.unityweb", | |||||
"TOTAL_MEMORY": 268435456, | |||||
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"], | |||||
"webglContextAttributes": {"preserveDrawingBuffer": false}, | |||||
"splashScreenStyle": "Dark", | |||||
"backgroundColor": "#231F20", | |||||
"cacheControl": {"default": "must-revalidate"} | |||||
} |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0307e02e88c2e9f419102b2a47ab68fd | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:187c75f0c272a04e9ee92922facff177067b3d4829c6653d1896ebf8f7dd06ab | |||||
size 5553639 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: d828ba042fc9b1d489098c25b45fd97f | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:b7d98daddd07e869e7e35bd082d9725f075c437c5c9459f5535c8dc50cb435c3 | |||||
size 96936 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b0133bc1be9a52845a3131437ae51617 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 790fb43fb508dca45a68bb9f7768faf0 | |||||
folderAsset: yes | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,24 @@ | |||||
function UnityProgress(gameInstance, progress) { | |||||
if (!gameInstance.Module) | |||||
return; | |||||
if (!gameInstance.logo) { | |||||
gameInstance.logo = document.createElement("div"); | |||||
gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle; | |||||
gameInstance.container.appendChild(gameInstance.logo); | |||||
} | |||||
if (!gameInstance.progress) { | |||||
gameInstance.progress = document.createElement("div"); | |||||
gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle; | |||||
gameInstance.progress.empty = document.createElement("div"); | |||||
gameInstance.progress.empty.className = "empty"; | |||||
gameInstance.progress.appendChild(gameInstance.progress.empty); | |||||
gameInstance.progress.full = document.createElement("div"); | |||||
gameInstance.progress.full.className = "full"; | |||||
gameInstance.progress.appendChild(gameInstance.progress.full); | |||||
gameInstance.container.appendChild(gameInstance.progress); | |||||
} | |||||
gameInstance.progress.full.style.width = (100 * progress) + "%"; | |||||
gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%"; | |||||
if (progress == 1) | |||||
gameInstance.logo.style.display = gameInstance.progress.style.display = "none"; | |||||
} |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: e8ed02e3265846244841b5e2db276f6a | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: adfc8ef557fa74f4983b9b1c3cf214fb | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:922b2a609219c96962e2e7af9d27c1f1935881de617c9d5cb08fdb0d034cafdc | |||||
size 345 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b4aea228be545f442a667212c8470978 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:3c901e72986f57b3dd474c5b8db981da26ec1d9ad92af9edc722172678c07d44 | |||||
size 155 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 097dca61fdf8a8c4980689e916f49ea0 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:efbfdb9313bdc0489d96339cf4352c1a80bc953050cf9a6c06a7ced0c0f1a4e2 | |||||
size 159 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8fca73a2805c57f48860bc10890d635a | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:2832fafec86b420ee29e0e2126b95767a22bff85d30dc90ed8de36246b395fd8 | |||||
size 137 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 9ed6abc2da6677e40af5767300029d5e | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:706765aced698c9790bb31eafd12b8161fadc46a62214926788a7a84cdc5fb51 | |||||
size 142 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: ea3a2642d139efb4a9c9819082691256 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:b95da4db2adc10af8bee6bfccb5246cc356b3164ce7caf6c7581c1002d64b71b | |||||
size 2343 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 96ce4826f21e7014aaf11a5cabe333cc | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:270d4f3c53ec8acbef1657520116e9bbd5efe074e4fc12db05fdb9a745ae96bb | |||||
size 2259 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 1e626ea48d428a543a10e9d1646df574 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,18 @@ | |||||
.webgl-content * {border: 0; margin: 0; padding: 0} | |||||
.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} | |||||
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);} | |||||
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;} | |||||
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;} | |||||
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;} | |||||
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;} | |||||
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');} | |||||
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');} | |||||
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');} | |||||
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;} | |||||
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;} | |||||
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;} | |||||
.webgl-content .footer .title {margin-right: 10px; float: right;} | |||||
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;} |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 574359c93b40a584eb8e6c3b20288a82 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | |||||
oid sha256:f02bcd2abdd299a100ab8e2a339b3f414727816901ecda211d68cb7ba0705da0 | |||||
size 3587 |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8b37961fac5d1b54cbada2dad0851247 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,25 @@ | |||||
<!DOCTYPE html> | |||||
<html lang="en-us"> | |||||
<head> | |||||
<meta charset="utf-8"> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |||||
<title>Unity WebGL Player | Pet.Move()</title> | |||||
<link rel="shortcut icon" href="TemplateData/favicon.ico"> | |||||
<link rel="stylesheet" href="TemplateData/style.css"> | |||||
<script src="TemplateData/UnityProgress.js"></script> | |||||
<script src="Build/UnityLoader.js"></script> | |||||
<script> | |||||
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/WebGLBuild.json", {onProgress: UnityProgress}); | |||||
</script> | |||||
</head> | |||||
<body> | |||||
<div class="webgl-content"> | |||||
<div id="gameContainer" style="width: 960px; height: 600px"></div> | |||||
<div class="footer"> | |||||
<div class="webgl-logo"></div> | |||||
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div> | |||||
<div class="title">Pet.Move()</div> | |||||
</div> | |||||
</div> | |||||
</body> | |||||
</html> |
@ -0,0 +1,7 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 1fc0652772fa71a4d914ad5d76a0d9d6 | |||||
DefaultImporter: | |||||
externalObjects: {} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -1,3 +1,3 @@ | |||||
version https://git-lfs.github.com/spec/v1 | version https://git-lfs.github.com/spec/v1 | ||||
oid sha256:758221ccdd8ed2b386a3367cc69cc6c5466fe975c0b4a77ac65f68abcdaa7ffd | |||||
size 2428 | |||||
oid sha256:06f2c9c42c3e01f1143d4c15cfe4f316cfab490aba17fde694e466c130d4e3a4 | |||||
size 2359 |