WebGL - Could Not Produce Class 91 - Engine Stripping

Unable to run a WebGL build (with or without WebAsm enabled) with engine stripping because of an error around class 91 being stripped (AnimatorController).

Why is an internal editor class impacting the build/runtime in this fashion? Editor classes should not?

AnimatorController is not just an editor class, there is also a native counter-part used at runtime.

Can you list for reference what must be added to link.xml to correct this problem (include class 91)? I have added what I thought was the correct xml, but it wouldn’t build on webgl. I used


I also tried it with assembly = UnityEditor, but this didn’t work either. I think I’m missing something.

Thanks

UnityEditor classes are only used in the editor so that would not have any effect on stripping.

what version of Unity are you using?

Just add an empty animation controller in one of your resources folder. FWIW I never figured out what to put in the xml file to make it not strip, but including an empty animation controller does the trick.