A Unity WebGL application featuring Augmented Reality (AR) capabilities powered by Vuforia. This project deploys an AR experience directly in the browser, eliminating the need for native app installation.
- Browser-based AR -- runs entirely in a WebGL-compatible browser with no install required
- Vuforia Image Tracking -- uses Vuforia target databases (
test_1) for marker-based AR - Responsive Layout -- adapts canvas for desktop (960x600) and mobile viewports
- Fullscreen Mode -- toggle fullscreen with a single click
- Loading Progress -- visual progress bar while the WASM build loads
- Gzip-compressed Assets -- smaller download sizes for data, framework, and WASM files
Serve the repository root with any static HTTP server. For example:
# Python
python -m http.server 8000
# Node.js (npx)
npx serve .Then open http://localhost:8000 in a WebGL-capable browser (Chrome, Firefox, Edge, Safari).
Upload the entire contents of this repository to any static hosting provider:
- GitHub Pages -- push to
mainand enable Pages in repository settings - Netlify / Vercel -- connect the repo and set the publish directory to
/ - AWS S3 / CloudFront -- sync the folder to an S3 bucket configured for static hosting
Note: WebGL AR requires HTTPS in production. Browsers block camera and sensor access on plain HTTP.
web_ar/
|-- index.html # Entry point; loads the Unity WebGL build
|-- LICENSE # MIT License
|-- README.md # This file
|-- Build/ # Unity WebGL build output
| |-- v1.loader.js # Unity loader script
| |-- v1.data.gz # Compressed game data
| |-- v1.framework.js.gz # Compressed Unity framework
| |-- v1.wasm.gz # Compressed WebAssembly code
|-- StreamingAssets/ # Runtime-loaded assets
| |-- Vuforia/ # Vuforia AR target databases
| |-- test_1.dat # Target data file
| |-- test_1.xml # Target metadata
|-- TemplateData/ # UI assets for the Unity WebGL template
|-- style.css # Page and canvas styles
|-- favicon.ico # Browser tab icon
|-- *.png # Progress bar, logos, and UI images
Key values from the build configuration in index.html:
| Property | Value |
|---|---|
| Company Name | DefaultCompany |
| Product Name | ar_we |
| Product Version | 0.1 |
| Canvas Size | 960 x 600 (desktop) |
| Browser | Supported |
|---|---|
| Chrome 57+ | Yes |
| Firefox 52+ | Yes |
| Safari 11+ | Yes |
| Edge 16+ | Yes |
| Mobile Safari | Yes |
| Chrome Android | Yes |
This project is licensed under the MIT License.
Copyright (c) 2023 tushar-alt