Required

  • WebGL module has already been installed on your unity editor
Screenshot 2024-02-25 at 10.09.17.png

1. Set up WebGL templates

  • Go to Edit -> Project Settings -> Player -> Web settings tab -> Resolution -> WebGL Template and select ezyplatform

2. Update preferences to minimise build size

  • Go to Edit -> Project Settings -> Player -> Web settings tab
    • Enable Strip Engine Code in Other Settings section
    • Select Gzip for Compression Format in Publishing Settings section

3. Build asset bundles

  • Go to Addressbles Groups window -> Tool -> New Build -> Default Build Script. Asset bundles will be built to ServerData/WebGL folder.
  • Go to EzyPlatform Admin Dashboard -> EzySmashers -> Asset Bundles and upload files in ServerData/WebGL to directory WebGL

4. Build and run

  • Go to File -> Build Settings
  • Change Platform to Web
  • Disable Development build field
  • Select DiskSize for Code Optimisation field
  • Click on Build and Run button
  • Select Build folder to ezysmashers-theme/src/main/resources/static/unity. After build finished, you can see:
Screenshot 2024-02-25 at 10.21.13.png
  • If you started ezysmashers-theme (by running EzySmashersThemeStartupTest) from IDE, you just need to reload http://localhost:8080/ on your browser
  • If you did not run ezysmashers-theme from IDE, you can navigate to ezyplatform home and restart web by bash cli.sh "restart web" (or .\cli.bat "restart web" in Windows)