Skip to content

Instantly share code, notes, and snippets.

@lee2sman
Created March 16, 2020 05:04
Show Gist options
  • Save lee2sman/f608b7035051171ea9f3d82dc251c46f to your computer and use it in GitHub Desktop.
Save lee2sman/f608b7035051171ea9f3d82dc251c46f to your computer and use it in GitHub Desktop.
Reminder notes on how to post WebGL builds of Unity games to my Everyday Code Sketches

I have been posting my code sketches for the past year to a site.

But now that I'm trying this out with Unity-WebGL I'm working on my Windows machine. These are notes since I always forget how to do it.

Workflow to post new webgl builds from unity to my everyday-code-sketches site

  1. Build for WebGL in Unity. (File > Build Settings, then click WebGL and Build). Wait a few minutes.
  2. Open git-bash and navigate to D drive (my external DATA drive) to the Sites/everyday directory cd /D/Sites/everyday
  3. git pull if i've been working on my other computers too and have made any changes there.
  4. Make a new sub-directory with a new number sequentially mkdir <number>
  5. Then I copy my webgl build from unity over to the new folder cp -r /D/unity-games/<game name> <folder directory number>
  6. I usually change the page title. vim <folder directory number>/index.html and change the <title></title> in line 6
  7. Optional: Add some secret comments near the top <! -- something something -->
  8. Update the site README.md and index.html with the new total sketch number. vim README.md then vim index.html
  9. Do the git thing git add README.md index.html <directory number> && git commit -m 'add <dir number>' && git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment