Note: Don’t forget to modify the line const string CUSTOM_TEMPLATE_NAME="CustomTemplate" to match the folder of your custom template Assets/WebGLTemplates/. Mine lives here: Assets/Scripts/Build/Editor/PostProcessWebGL.cs. I prefer to set the Advanced option Post-Export Method to call this from my config dashboard.Ĭreate a the file PostProcessWebGL.cs and put it in a folder named Editor in your project. Which may not be desirable if you want to disable your custom template without removing the code. In bourriquet’s solution Unity Cloud Build now reports = Application:Default instead of PROJECT:CustomTemplate like it (probably) used to, which was a much better way of getting the selected WebGL template from the editor, but alas, it doesn’t work anymore.īoth solutions leverage a PostBuild attribute. Still, a huge shoutout and thank you for their time and effort posting their code solutions that used to work. YMMV.Īfter searching for a solution I found this script written by user PlayItSafe_Fries and slightly below it modified code by user bourriquet.īoth scripts were huge steps in the right direction, but neither worked. I’ve been informed this might not work for Unity 2020+, though the thread is still active and users are contributing weekly. Here are the steps and scripts I setup with the final working configuration to help you if you run into this issue, also a simple AutoIncrementing script to display the cloud build version. I couldn’t ignore the fact that others will most certainly have the same issues and since the resources for solving it are 1) incorrect for current Unity versions and 2) old responses. This is not something we plan to support at the moment. Unity should respect and use the custom WebGL template we defined for our project when doing cloud builds.īut…based on the most recent comment I can find on the issue, this isn’t going to be added… It’s 2020 and the default Unity Template doesn’t include an option to dynamically resize based on browser resolution or even customize our CSS on a per client basis. Until my Cloud WebGL builds refuse to use my custom template. As a developer who creates large Unity projects where I need to deploy to multiple platforms often for my clients, Unity Cloud Build was a product I was super happy to embrace…
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |