In the fast-paced world of game development, encountering and resolving bugs is an inevitable part of the process. Recently, our team at 7-Shapes played a crucial role in identifying and fixing a significant bug in Unity’s WebGL build process. This bug, which affected the “Append Hash” option in Unity version 2022.3.8f1, was causing major headaches for developers worldwide. Here’s a detailed look at the issue, how we discovered it, the role of hashes in this process, and the steps we took to ensure it was resolved.
The Issue: Corrupted Manifest Files in WebGL Builds
Starting with Unity version 2022.3.8f1, a problematic behavior emerged when building WebGL projects with the “Append Hash” option enabled. Specifically, the .manifest files had hash texts appended to their names. This was a critical issue because manifest files should not have hashes appended to them, as they need to be searchable via Unity. The incorrect appending of hashes caused final builds to crash, as the system could not locate the necessary manifest files for Unity scenes.
Understanding Hashes
Hashes are strings of characters generated from files or data using specific algorithms. They serve as unique identifiers for data, ensuring that even the slightest change in the data results in a completely different hash. In the context of Unity builds, appending hashes to asset filenames helps manage versioning and caching. By changing the hash when the asset changes, developers can ensure that users always receive the latest version of the asset without conflicts from cached versions.
However, this approach should not apply to manifest files, which are essential for Unity to locate and load other assets. Manifest files need to be easily and consistently located by their names, which should remain unchanged for reliable referencing.
Identifying the Bug
Our team first noticed the issue when our WebGL builds began failing inexplicably. After thorough investigation, we pinpointed the problem to the newly appended hashes in manifest file names in Unity version 2022.3.8f1. To verify our findings, we created an empty Unity project and replicated the build process under controlled conditions.
We used Unity version 2022.3.7f1 as a reference, which demonstrated the correct behavior—manifest files were generated without hashes, allowing them to be properly located and loaded. In contrast, performing the same build process with Unity version 2022.3.8f1 produced the corrupted manifests, confirming our suspicions.
Taking Action: Reporting and Proving the Bug
Armed with our evidence, we reported the bug to Unity. To strengthen our case, we provided a detailed report and the empty project we used to demonstrate the issue. This project clearly showcased the problem by contrasting the behaviors of versions 2022.3.7f1 and 2022.3.8f1 under identical settings.
Our thorough documentation and the reproducible proof we supplied were instrumental in getting Unity’s attention. Recognizing the severity of the issue and the clarity of our evidence, Unity promptly added the bug to their issue tracker. You can view the bug report here: Unity Issue Tracker.
The Resolution: Unity 2022.3.34
Thanks to our efforts and collaboration with Unity’s development team, the bug was fixed in Unity version 2022.3.34. This version now ensures that manifest files generated during WebGL builds do not have hashes appended when the “Append Hash” option is enabled, restoring the correct behavior and preventing build crashes.
Conclusion
At 7-Shapes , we take pride in not only developing our projects, but also in contributing to the broader game development community. Our proactive approach to identifying and resolving this Unity bug is a testament to our commitment to quality and collaboration. We’re thrilled to have helped improve Unity for developers everywhere.
If you encounter similar issues or have any questions about this process, feel free to reach out. We’re always here to support and share our expertise with the community.