https://openbrush.app/ logo
Why won't my Unity project build for web?
# unity-integrations
s
I've been getting errors getting Unity to make a web build, despite following the Open Brush SDK docs and looking through some advice here. Could I get some help figuring this out?
First, some troubleshooting details and what I've tried so far
Unity 2022.3 on the 3D built-in render pipeline, Open Brush Unity SDK 24.0.0
plus the json.net package listed alongside the SDK
The Open Brush sketch was imported to Unity around October 2023
# The problem The build fails with errors that Newtonsoft and JsonIgnore, etc. aren't found, even though I did import the provided json.net package https://cdn.discordapp.com/attachments/1455633242739970231/1455635423668863037/image.png?ex=695571a1&is=69542021&hm=f141d46f561afdfd9344c4fbef0a8b86e38e7f47a29f267efd2fe239743513f8&
Following the docs on [exporting](https://docs.openbrush.app/user-guide/exporting-open-brush-sketches-to-other-apps) and [the SDK](https://docs.openbrush.app/user-guide/open-brush-unity-sdk), I also removed the audio reactivity assets from the SDK to support the WebGL target, since I'm not using those anyway
# What I've figured out so far
# What I've tried out so far With this SDK setup, I get no errors when building for Windows, and the resulting program runs fine.
I also tried with a new project: just SDK, json.net, removed audio reactivity, and no Open Brush sketch, but the web build still fails with the same errors
I tried just a blank project without the SDK and json.net, only the default Unity 3D scene, and that does build for web
a
Although - a lot has changed since then so that won't be 100% of the changes (we now probably rely on threads in more places which I think is still an issue for web builds)
PS - this really belongs in #804251629993197618
Building for web is a pretty big task. If I were you I'd examine the commit history for Silk Brush to get a sense of what was neccesary https://github.com/msub2/silk-brush
s
To be clear, I'm not trying to build the Open Brush application itself. I have my own Unity project, which contains a sketch imported using the Open Brush Unity SDK. I'm trying to build my Unity project, but the WebGL target fails. Sorry for not making that clear enough
2 Views