WebGL build problems with assembly definition asset file

I got 181 errors mostly related to cs0246. After removing asmdef file totally webgl seems to build again. Is it not possible to use asmdef together with webgl?

2 Likes

I have not been aware of WebGL specific limitations in organizing C# code into assemblies. It should be the same for all IL2CPP utilizing platforms. Does a native Windows/macOS build work if you choose IL2CPP as the scripting backend?

I have a similar problem.

I have an own assembly definition in a sub-directory in the asset directory for a namespace, which I need so UI Toolkit is compiled in the correct order ( as recommended here and it solved that problem ).

But I get over 100 compile erros of classes from other namespaces not found if I use the asmdef when I try to built it for WebGL. It works fine in the Editor itself when played.

But if I remove it it compiles without problems to WebGL.

(added one day later : also now UI Toolkit is also compiling correctly without the custom asmdef, which it did not before without the assembly def for my namsspace. this is very confusing)

@jukka_j will try later what you asked