{"id":16115159,"url":"https://github.com/bwc9876/unitywebgltemplate","last_synced_at":"2025-04-06T08:19:24.290Z","repository":{"id":44945916,"uuid":"413154989","full_name":"Bwc9876/UnityWebGLTemplate","owner":"Bwc9876","description":"A template repo you can use to push your Unity WebGL games to Github pages","archived":false,"fork":false,"pushed_at":"2022-01-29T02:08:12.000Z","size":227,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T13:55:46.205Z","etag":null,"topics":["github-actions","github-pages","template","unity","unity-builder","webgl"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bwc9876.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-03T17:55:12.000Z","updated_at":"2023-10-01T14:03:07.000Z","dependencies_parsed_at":"2022-08-31T13:33:36.851Z","dependency_job_id":null,"html_url":"https://github.com/Bwc9876/UnityWebGLTemplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bwc9876%2FUnityWebGLTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bwc9876%2FUnityWebGLTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bwc9876%2FUnityWebGLTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bwc9876%2FUnityWebGLTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bwc9876","download_url":"https://codeload.github.com/Bwc9876/UnityWebGLTemplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247452021,"owners_count":20941005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","github-pages","template","unity","unity-builder","webgl"],"created_at":"2024-10-09T20:17:42.443Z","updated_at":"2025-04-06T08:19:24.261Z","avatar_url":"https://github.com/Bwc9876.png","language":null,"readme":"# UnityWebGLTemplate\n\nA template repo you can use to push your WebGL games to GitHub pages.  \n\nUses:\n- [Unity Builder](https://github.com/marketplace/actions/unity-builder)\n- [Unity License Activation](https://github.com/marketplace/actions/unity-request-activation-file)\n- [Deploy to Pages](https://github.com/marketplace/actions/deploy-to-github-pages)  \n\n[Example Repo](https://github.com/Bwc9876/UnityWebGL)\n\n## How it Works\n\nWhenever you merge a pull request, GitHub will automatically compile your game using Unity to WebGL, the resulting build files will then be pushed to the gh-pages branch.\n\n## Setup\n\n### Template Cloning\n\nIn the top right, select \"Use this template\", in the subsequent screen **ensure that you select \"Include all branches\"** or else the workflows won't work.  \n  \n![Clone the template](/images/clone-repo.png \"Clone the template\")\n\n### Generating Project Files\n\nOpen Unity Hub, create a new project and set up whatever options you need to. Once the project is created close unity.  \nNow open GitHub desktop, clone the repo into any folder.  \n  \nCopy the following folders from the Unity Project folder to the Git repo folder:\n- ProjectSettings\n- Assets\n- Packages  \n  \nOnce these are copied, delete the Unity Project folder and remove it from Unity Hub.  Finally, open the Git repo folder in UnityHub as a project.  \n\nNow the unity project folder and the git repo folder have been merged successfully.  \n\n### Versions  \n\nFirst things first, you're going to want to go to [activate.yml](.github/workflows/activate.yml#L13) and edit \"unityVersion\" on line 13 to your target unity version.  \nYou're also going to want to do this in [main.yml](.github/workflows/main.yml#L44) on line 44.  \n\n### License\n\nNow, go to the \"Actions\" tab of this repo and select \"Acquire activation file\" in the left plane and click \"Run workflow\", then run it on the main branch. This will create a license request file as an artifact, to access this file click \"Acquire Activation file\" in the list of actions, and wait for the action to complete  \n  \n![Run Acquire activation action](/images/run-license-action.png \"Run the action on the main branch\")  \n  \nIf all goes well, there should be an artifact available to download with the name Unity.your_unity_version.alf, download this file to your local machine.  \n  \n![Download artifact](/images/download-artifact.png \"Look for Artifacts at the bottom\")  \n  \nOnce downloaded, head to https://license.unity3d.com/manual.  There, you will upload your .alf file, and retrieve a .ulf file. Now you need to go to the Settings tab of your repo, click on \"Secrets\" on the left, and add a secret named \"UNITY_LICENSE\" with the contents of your .ulf file. This will allow the unity builder action to run unity installations.  \n\nAfter this step is done, it is safe to delete [activate.yml](.github/workflows/activate.yml)  \n  \nChanging versions will require you to repeat this step!  \n\n## Important note about compression\n\nGitHub pages does not allow for you to configure HTTP response headers for compression; so, you'll need to disable it in player settings.  \nHead to `Edit \u003e Project Settings \u003e Player \u003e Scroll down to \"other settings\" \u003e Click the dropdown labelled \"Compression Format\" and select \"Disabled\"`.  \nAlso check the `Decompression Fallback` option.\n\n## Try It Out\n\nNow that your Unity license is setup, make a PR and merge it to your main branch, as long as the PR affects the game (stuff like the README and .gitignore won't trigger a build) the build action will start. Once the action finishes, open the page through the \"deployments\" section on the right side.\n  \n## Config\n\nBy default, unity builder won't run if the branch is 'dirty'. This means that you've directly edited the main branch and didn't use a Pull Request. to mitigate this, uncomment line 45 in [main.yml](.github/workflows/main.yml#L45).    \n  \nTo enable the ability to build manually (without having to push), uncomment line 20 in [main.yml](.github/workflows/main.yml#L20).  \n\n## Post-Setup\n\nAfter setup you should delete this README file in favor of your own, the images folder can also be deleted.  \n\n## Optional Steps\n\n[Integrate With Discord](https://ardalis.com/integrate-github-and-discord-with-webhooks/)  \n[Customize WebGL Template](https://docs.unity3d.com/Manual/webgl-templates.html)  \n[Integrate a Testing Suite](https://game.ci/docs/github/test-runner)  \n[Setup your own Runner for Faster Builds](https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners)  \n[Use a custom pull-request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository)  \n[Use Git LFS (Edit your .gitattributes)](https://gist.github.com/webbertakken/ff250a0d5e59a8aae961c2e509c07fbc)  \n[Add a Status Badge](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge)  \n[Use a custom domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site) \n  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwc9876%2Funitywebgltemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwc9876%2Funitywebgltemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwc9876%2Funitywebgltemplate/lists"}