├── .gitignore ├── Assets ├── Basic.mat ├── Basic.mat.meta ├── ClickAndGetImage.cs ├── ClickAndGetImage.cs.meta ├── GetImage.cs ├── GetImage.cs.meta ├── GetImageFromUser.unity ├── GetImageFromUser.unity.meta ├── Plugins.meta ├── Plugins │ ├── WebGL.meta │ └── WebGL │ │ ├── GetImage.jslib │ │ └── GetImage.jslib.meta ├── Spin.anim ├── Spin.anim.meta ├── Spin.cs └── Spin.cs.meta ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset ├── README.md ├── example.gif └── test.html /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | node_modules 3 | bower_components 4 | Temp 5 | Library 6 | .DS_Store 7 | *~ 8 | *.swp 9 | *.bat 10 | *.bak 11 | temp 12 | .mayaSwatches 13 | .git 14 | .svn 15 | .hg 16 | *.pyc 17 | *.orig 18 | .project 19 | *.vpj 20 | *.vpw 21 | *.vpwhistu 22 | *.vtg 23 | *.csproj 24 | *.unityproj 25 | *.sln 26 | *.user 27 | *.userprefs 28 | -------------------------------------------------------------------------------- /Assets/Basic.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/Assets/Basic.mat -------------------------------------------------------------------------------- /Assets/Basic.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2459f077c90ac4ad894fbc24e34c9cf2 3 | timeCreated: 1454573770 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ClickAndGetImage.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Gregg Tavares. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Gregg Tavares. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | using UnityEngine; 32 | using System; 33 | using System.Collections; 34 | 35 | public class ClickAndGetImage : MonoBehaviour { 36 | 37 | void OnMouseOver() 38 | { 39 | if(Input.GetMouseButtonDown(0)) 40 | { 41 | // NOTE: gameObject.name MUST BE UNIQUE!!!! 42 | GetImage.GetImageFromUserAsync(gameObject.name, "ReceiveImage"); 43 | } 44 | } 45 | 46 | static string s_dataUrlPrefix = "data:image/png;base64,"; 47 | public void ReceiveImage(string dataUrl) 48 | { 49 | if (dataUrl.StartsWith(s_dataUrlPrefix)) 50 | { 51 | byte[] pngData = System.Convert.FromBase64String(dataUrl.Substring(s_dataUrlPrefix.Length)); 52 | 53 | // Create a new Texture (or use some old one?) 54 | Texture2D tex = new Texture2D(1, 1); // does the size matter? 55 | if (tex.LoadImage(pngData)) 56 | { 57 | Renderer renderer = GetComponent(); 58 | 59 | renderer.material.mainTexture = tex; 60 | } 61 | else 62 | { 63 | Debug.LogError("could not decode image"); 64 | } 65 | } 66 | else 67 | { 68 | Debug.LogError("Error getting image:" + dataUrl); 69 | } 70 | } 71 | } 72 | 73 | 74 | -------------------------------------------------------------------------------- /Assets/ClickAndGetImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f0a6867e282446d69b4c41ce282ed00 3 | timeCreated: 1454573806 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/GetImage.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Gregg Tavares. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Gregg Tavares. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | using UnityEngine; 32 | using System.Collections; 33 | using System.Runtime.InteropServices; 34 | 35 | public class GetImage { 36 | 37 | #if UNITY_WEBGL 38 | 39 | [DllImport("__Internal")] 40 | private static extern void getImageFromBrowser(string objectName, string callbackFuncName); 41 | 42 | #endif 43 | 44 | static public void GetImageFromUserAsync(string objectName, string callbackFuncName) 45 | { 46 | #if UNITY_WEBGL 47 | 48 | getImageFromBrowser(objectName, callbackFuncName); 49 | 50 | #else 51 | 52 | Debug.LogError("Not implemented in this platform"); 53 | 54 | #endif 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/GetImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f80f79e3a8ac46a585cee8db79b3af4 3 | timeCreated: 1454578486 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/GetImageFromUser.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/Assets/GetImageFromUser.unity -------------------------------------------------------------------------------- /Assets/GetImageFromUser.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56ab40ac1b3b94827923eb021be61bfd 3 | timeCreated: 1454589401 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44d617d29b026416da57fa217c4c702e 3 | folderAsset: yes 4 | timeCreated: 1454574342 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/WebGL.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 28491c03392c44ecdb974435fa488190 3 | folderAsset: yes 4 | timeCreated: 1454574349 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Plugins/WebGL/GetImage.jslib: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Gregg Tavares. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are 7 | * met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * * Redistributions in binary form must reproduce the above 12 | * copyright notice, this list of conditions and the following disclaimer 13 | * in the documentation and/or other materials provided with the 14 | * distribution. 15 | * * Neither the name of Gregg Tavares. nor the names of its 16 | * contributors may be used to endorse or promote products derived from 17 | * this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | var getImage = { 32 | getImageFromBrowser: function(objectNamePtr, funcNamePtr) { 33 | // Because unity is currently bad at JavaScript we can't use standard 34 | // JavaScript idioms like closures so we have to use global variables :( 35 | window.becauseUnitysBadWithJavacript_getImageFromBrowser = 36 | window.becauseUnitysBadWithJavacript_getImageFromBrowser || { 37 | busy: false, 38 | initialized: false, 39 | rootDisplayStyle: null, // style to make root element visible 40 | root_: null, // root element of form 41 | ctx_: null, // canvas for getting image data; 42 | }; 43 | var g = window.becauseUnitysBadWithJavacript_getImageFromBrowser; 44 | if (g.busy) { 45 | // Don't let multiple requests come in 46 | return; 47 | } 48 | g.busy = true; 49 | 50 | var objectName = Pointer_stringify(objectNamePtr); 51 | var funcName = Pointer_stringify(funcNamePtr); 52 | 53 | if (!g.initialized) { 54 | g.initialized = true; 55 | g.ctx = window.document.createElement("canvas").getContext("2d"); 56 | 57 | // Append a form to the page (more self contained than editing the HTML?) 58 | g.root = window.document.createElement("div"); 59 | g.root.innerHTML = [ 60 | ' ', 100 | '
', 101 | '
', 102 | ' ', 103 | '
', 104 | ' cancel ', 105 | '
', 106 | '
', 107 | ].join('\n'); 108 | var input = g.root.querySelector("input"); 109 | input.addEventListener('change', getPic); 110 | 111 | // prevent clicking in input or label from canceling 112 | input.addEventListener('click', preventOtherClicks); 113 | var label = g.root.querySelector("label"); 114 | label.addEventListener('click', preventOtherClicks); 115 | 116 | // clicking cancel or outside cancels 117 | var cancel = g.root.querySelector("a"); // there's only one 118 | cancel.addEventListener('click', handleCancel); 119 | var getImage = g.root.querySelector(".getimage"); 120 | getImage.addEventListener('click', handleCancel); 121 | 122 | // remember the original style 123 | g.rootDisplayStyle = g.root.style.display; 124 | 125 | window.document.body.appendChild(g.root); 126 | } 127 | 128 | // make it visible 129 | g.root.style.display = g.rootDisplayStyle; 130 | 131 | function preventOtherClicks(evt) { 132 | evt.stopPropagation(); 133 | } 134 | 135 | function getPic(evt) { 136 | evt.stopPropagation(); 137 | var fileInput = evt.target.files; 138 | if (!fileInput || !fileInput.length) { 139 | return sendError("no image selected"); 140 | } 141 | 142 | var picURL = window.URL.createObjectURL(fileInput[0]); 143 | var img = new window.Image(); 144 | img.addEventListener('load', handleImageLoad); 145 | img.addEventListener('error', handleImageError); 146 | img.src = picURL; 147 | } 148 | 149 | function handleCancel(evt) { 150 | evt.stopPropagation(); 151 | evt.preventDefault(); 152 | sendError("cancelled"); 153 | } 154 | 155 | function handleImageError(evt) { 156 | sendError("Could not get image"); 157 | } 158 | 159 | function handleImageLoad(evt) { 160 | var img = evt.target; 161 | window.URL.revokeObjectURL(img.src); 162 | // We probably don't want the fullsize image. It might be 3000x2000 pixels or something too big 163 | g.ctx.canvas.width = 256; 164 | g.ctx.canvas.height = 256; 165 | g.ctx.drawImage(img, 0, 0, g.ctx.canvas.width, g.ctx.canvas.height); 166 | 167 | var dataUrl = g.ctx.canvas.toDataURL(); 168 | 169 | // free the canvas memory (could probably be zero) 170 | g.ctx.canvas.width = 1; 171 | g.ctx.canvas.height = 1; 172 | 173 | sendResult(dataUrl); 174 | g.busy = false; 175 | } 176 | 177 | function sendError(msg) { 178 | sendResult("error: " + msg); 179 | } 180 | 181 | function hide() { 182 | g.root.style.display = "none"; 183 | } 184 | 185 | function sendResult(result) { 186 | hide(); 187 | g.busy = false; 188 | SendMessage(objectName, funcName, result); 189 | } 190 | }, 191 | }; 192 | 193 | mergeInto(LibraryManager.library, getImage); 194 | 195 | 196 | -------------------------------------------------------------------------------- /Assets/Plugins/WebGL/GetImage.jslib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89eb3872e3c4f4107b8de16ecf38b921 3 | timeCreated: 1454574416 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | userData: 15 | assetBundleName: 16 | assetBundleVariant: 17 | -------------------------------------------------------------------------------- /Assets/Spin.anim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/Assets/Spin.anim -------------------------------------------------------------------------------- /Assets/Spin.anim.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8417b28d793434955b0517a8d6ea3138 3 | timeCreated: 1454572988 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Spin.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Spin : MonoBehaviour { 5 | 6 | // Use this for initialization 7 | void Start () { 8 | t = GetComponent(); 9 | } 10 | 11 | // Update is called once per frame 12 | void Update () { 13 | t.localEulerAngles = t.localEulerAngles + new Vector3(0, Time.deltaTime * 120.0f, 0); 14 | } 15 | 16 | Transform t; 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Spin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 973ea7319d32c467680f27171c13b62e 3 | timeCreated: 1454573606 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.1f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Example of Unity-WebGL asking the user for an image 2 | =================================================== 3 | 4 | ![example](example.gif) 5 | 6 | [You can see it live here](http://greggman.github.io/getuserimage-unity-webgl/webgl/). 7 | 8 | And [here's a .unitypackage](https://github.com/greggman/getuserimage-unity-webgl/releases/download/v0.0.2/GetImageFromUser.unitypackage). 9 | 10 | -------------------------------------------------------------------------------- /example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/greggman/getuserimage-unity-webgl/2e9721a031999f24756931e76b2745c989e4743c/example.gif -------------------------------------------------------------------------------- /test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 27 | --------------------------------------------------------------------------------