Skip to content

Demonstrates javascript plugin support for Unity WebGL Builds

Notifications You must be signed in to change notification settings

jimu/WebGL-Tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity WebGL Browser Tests

Various tests of Unity WebGL Build features:

  • Audio/Muting - Unmutes connect.unity.com - js plugin
  • Full Screen - 1 click js plugin
  • Redirect to new window - 1 click js plugin
  • Local Storage vs. Player Profiles

Online at

Usage

  • Press Increment Regular and Increment Static to change class member variable values. Then press Load Scene 1 to demonstrate that static variables persist even after a scene is reloaded
  • Press Cookies to use javascript to return HTML cookies. connect.unity.com isolates your app in an iframe so there may be no cookies. simmer.io does return some cookies.
  • Press Full Screen to demonstrate that the unity fullscreen support requires two clicks
  • Press Full Screen JS to demonstrate that fullscreen can be used with a single click by utilizing javascript's onpress
  • Press Link New Tab JS to open a new browser tab with one click (using javascript)
  • Press Store PlayerPrefs to store the reglar variable to PlayerPrefs
  • Press Store LocalStorage to store the regular variable to LocalStorage (javascript)
  • Press Delete PlayerPrefs to clear PlayerPrefs
  • Press Delete LocalStorage to clear LocalStorage (javascript)
  • Press Show Persisted Values to display PlayerPrefs and LocalStorage values
  • Press Get Document Title to fetch the browser window/iframe document title (javascript)
  • Don't bother with Toggle Mute JS - It doesn't work on connect.unity.com due to cross-origin restrictions (COR)
  • Press Play Music to start playing music
  • Press Mute/Unmute Audio to use mute music using unitys built-in audio support. Demonstrates that this does NOT work on connect.unity.com
  • Press Unmute JS to unmute audio on connect.unity.com without needing to press the unmute icon in the lower right corner (javascript)

About

Demonstrates javascript plugin support for Unity WebGL Builds

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages