# WebGL scene and Needle error

**URL:** <https://forum.needle.tools/t/webgl-scene-and-needle-error/1845>\
**Category:** 🌵 Needle Engine\
**Tags:** question\
**Created:** [September 24, 2024, 11:44am UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845 "2024-09-24T11:44:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![zardtomcat](https://forum.needle.tools/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zardtomcat](https://forum.needle.tools/u/zardtomcat)\
**Post date:** [September 24, 2024, 11:44am UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/1 "2024-09-24T11:44:48Z")

</div>

Hello,

I have a Needle scene which I use for my testing. I then created a new scene and copied all assets from the old scene (except the Export and XR) into the new scene.

I then tried to build the new scene in WebGL, but I am getting these errors.

 ![image](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/2X/2/29d7e976c072ccdc11a781ff18bd49ac1bfc2fc6.png)

Why am I getting these erros, when I have removed teh Export and XR objects from my scene?

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [September 24, 2024, 11:54am UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/2 "2024-09-24T11:54:37Z")

</div>

Hi, this looks like an issue in the Unity plugin. We’ll look into it

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [September 24, 2024, 12:09pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/3 "2024-09-24T12:09:02Z")

</div>

Which Unity Editor version are you using?

---

<div class="post-metadata">

**Author:** ![zardtomcat](https://forum.needle.tools/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zardtomcat](https://forum.needle.tools/u/zardtomcat)\
**Post date:** [September 24, 2024, 1:13pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/4 "2024-09-24T13:13:25Z")

</div>

I am using 2021.3.25f1.

BTW, I want to finish off my testing, so is there a way that I can remove all dependencies to Needle and just compile for WebGL instead for testing?

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [September 24, 2024, 2:19pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/5 "2024-09-24T14:19:33Z")

</div>

Can you update the Unity package to version 3.48.2 ? It should fix the error [Releases & Changelogs - #31 by needle-bot](https://forum.needle.tools/t/releases-changelogs/164/31)

---

<div class="post-metadata">

**Author:** ![zardtomcat](https://forum.needle.tools/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zardtomcat](https://forum.needle.tools/u/zardtomcat)\
**Post date:** [September 25, 2024, 10:53am UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/6 "2024-09-25T10:53:17Z")

</div>

Thanks, this worked and I dont get compilation errors. One odd thing happens which is that in WebGL export none of the buttons work and I cant navigate the environment. I am guessing this has happened because, I have left out the XR and Export objects.

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [September 25, 2024, 11:53am UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/7 "2024-09-25T11:53:26Z")

</div>

When you export to WebGL in Unity you’ll get Unity WebGL - The Needle Engine components are using Needle Engine, which is our own runtime.

To build that you need to use the “Needle Engine” platform.

![image](https://europe1.discourse-cdn.com/flex006/uploads/needle1/original/2X/c/c8499cdd397f50cd86795497d7cb41103abed3cc.png)

---

<div class="post-metadata">

**Author:** ![zardtomcat](https://forum.needle.tools/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zardtomcat](https://forum.needle.tools/u/zardtomcat)\
**Post date:** [September 25, 2024, 1:39pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/8 "2024-09-25T13:39:29Z")

</div>

Thanks, I use the Needle Engine environment when I use needle.

---

<div class="post-metadata">

**Author:** ![Marcel\_Wiessler1](https://forum.needle.tools/user_avatar/forum.needle.tools/marcel_wiessler1/32/21_2.png) [@Marcel\_Wiessler1](https://forum.needle.tools/u/Marcel_Wiessler1)\
**Post date:** [September 25, 2024, 3:24pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/9 "2024-09-25T15:24:03Z")

</div>

Then I’m not sure what you mean by `in WebGL export none of the buttons work and I cant navigate the environment.` - when you export to Unity’s WebGL you’re using Unity/C# and there’s no Needle Engine code running.

---

<div class="post-metadata">

**Author:** ![zardtomcat](https://forum.needle.tools/letter_avatar_proxy/v4/letter/z/e8c25b/32.png) [@zardtomcat](https://forum.needle.tools/u/zardtomcat)\
**Post date:** [September 25, 2024, 4:42pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/10 "2024-09-25T16:42:41Z")

</div>

What I mean is that I had created two environments one in Needle and one in WebGL. Needle seems to have performance challenges when loading graphic rich scenes. Several of models were not working (an issue that I had reported a while ago and sent out a bug report) so I was testing it in WebGL to see where the problem was.

Here is a link to the other issue:

> [@FBX model doesnt show when exported - Is this esbuild or fsevent issue](https://forum.needle.tools/t/fbx-model-doesnt-show-when-exported-is-this-esbuild-or-fsevent-issue/1734):
>
> Hi, I am using unity editor and have imported three models into my scene which are two FBX models and two GLB. One of my FBX models doenst show at all and one of the GLB models replicates itself and creates an extra instance of itself which is scaled up (and shows as a huge object.) I am using the latest needle toolkit running on a Mac (M1 chip). The toolkit has also been acting strangely for example the browser downloads packages such as fsevents and esbuild which Macos detects as unauthori…

As said in original post,  
_I have a Needle scene which I use for my testing. I then created a new scene and copied all assets from the old scene (except the Export and XR) into the new scene._

_I then tried to build the new scene in WebGL, but I am getting these errors._

The errors have disappeared when I loaded the new version of Needle.

Hopefully this helps. Let me know if it is still unclear.

---

<div class="post-metadata">

**Author:** ![system](https://forum.needle.tools/user_avatar/forum.needle.tools/system/32/20_2.png) [@system](https://forum.needle.tools/u/system)\
**Post date:** [October 8, 2024, 4:42pm UTC](https://forum.needle.tools/t/webgl-scene-and-needle-error/1845/11 "2024-10-08T16:42:54Z")

</div>

Closed on October 8, 2024, 4:42pm UTC

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.
