Multiple issue on WebGL build

Hi there,

I am facing two issue on my current WebGL build made with Unity 5.3.2p3 here they are :

I have faced multiple Could not produce class with ID XXX which has been solved using the link.xml file but there’s one remaining and I can’t get rid of it : Could not produce class with ID 228
It seems to be the SpeedTreeWindAsset but there’s no reference of this class in the Unity documentation and even adding it this way in the link file doesn’t fix the issue.

<type fullname="UnityEngine.SpeedTreeWindAsset" preserve="all"/>

The next issue is related to UnityWebRequest.downloadProgress which is working well in the editor but always return 0 in the WebGL build.

using (UnityWebRequest request = UnityWebRequest.GetAssetBundle(_dataUrl))
{
  request.Send();
   while (!request.isDone)
   {
    Debug.Log("Download progress: " + request.downloadProgress);
    yield return request;
    //yield return new WaitForEndOfFrame();
   }
   ...
}

Any idea how could I fix those issues ?
Thank you !

I am Have you tried to preserve UnityEngine.Tree instead ?

Thanks for your answer @Marco-Trivellato .
Yes, here is the complete link.xml file and it doesn’t fix the issue.

<linker>
    <assembly fullname="UnityEngine">
        <type fullname="UnityEngine.Tree" preserve="all"/>
        <type fullname="UnityEngine.LODGroup" preserve="all"/>
        <type fullname="UnityEngine.BillboardAsset" preserve="all"/>
        <type fullname="UnityEngine.BillboardRenderer" preserve="all"/>
        <type fullname="UnityEngine.SpeedTreeWindAsset" preserve="all"/>
    </assembly>
</linker>

Any idea concerning the UnityWebRequest issue ?

not yet. Would you mind submitting two separate bug reports ? (same repro project is fine)

actually, no need for a bug report for the SpeedTreeWindAsset stripping issue as i am able to reproduce it too.

Thanks you very much for your very fast answers and your support. I’ve also sent you a private message.

Since I haven’t found a way to fix the SpeedTreeWindAsset issue yet, I filed a bug report #773309 (You should be able to see it in the public bug tracker within a few hours). However, as a workaround you can create a dummy scene containing your speed tree asset, and add it to the project. This will prevent SpeedTreeWindAsset from being stripped so you can still download and instantiate trees from asset bundles.

Thank for the bug report and for the workaround, I’ll try that.

@Marco-Trivellato I’ve added a scene with a Wind Zone in my project and the Could not produce class with ID 228 error is gone. Thank you for the workaround.

Edit : My bad, adding the Wind Zone only didn’t fixed the issue but adding the complete asset in a scene, as you suggested, fixes it.