I have a few questions about Needle

hello! Thanks for making such a great tool.
Iā€™ve been watching the tutorial, but Iā€™m still not sure about Needle, so I have a few questions.

  1. Is this a tool that converts Unity projects into Three.js and exports them to the web?
  2. Is it possible to mix and use C# code like an existing Unity project?
  3. When I saw the tutorial, I could see the other personā€™s point of view (camera) through the network. Is it possible to implement multiplayer (displayed as a character) using this?

Original Post on Discord

by user 745912722356699257

Hi,

  1. This depends on what features you are using. If you use timeline and animators for example then yes, it will work on the web. What will not work out of the box is any custom C# code. That you will have to convert to typscript (we have some helpers and convertion tools for a quick start but youā€™ll have to write a little bit of typescript probably) Feature Overview | Needle Engine Documentation
  2. Yes you can mixmatch, you can have a project that still works as a normal standalone unity app (for whatever platform) and at the same time export to threejs (see answer to 1)) Deployment & Compression | Needle Engine Documentation
  3. We have builtin networking and itā€™s possible to use your own networking backend or another solution if you need to.
    Itā€™s possible yes, Felix did a little demo/presentation here a while ago: https://www.youtube.com/watch?v=joQJH-mmEII&ab_channel=Webaverse

Thank you for answer! However, after watching the video you sent, Iā€™m still struggling with implementing multiplayer.

  1. First of all, I was practicing with the ā€˜third character controllerā€™ that exists in the sample scene.
  2. Added ā€˜PlayerStateā€™ to the Character component.
  3. I also added an ā€˜Emptyā€™ named ā€˜playerā€™ to the scene and added a ā€˜PlayerSyncā€™ component. The parameter ā€˜Assetā€™ is specified as Character.

by user 745912722356699257

by user 745912722356699257

But Iā€™m having a ā€˜character disappearingā€™ problem like this video, and I havenā€™t solved it yet.

by user 745912722356699257

Can you try changing your character to a Prefab and then assigning the Prefab to PlayerSync?
image.png

Iā€™ll try it. Thanks you so much.wait a minute!

by user 745912722356699257

Did I do it right? Why is the character being duplicated? :disappointed_relieved:ā€¦

by user 745912722356699257

It looks like he is in your scene twice (on time in the scene and one time instantiated by PlayerSync)
image.png

You dont need the prefab in the scene. Just referencing the prefab asset from PlayerSync should do it

Thanks! I deleted the prefab in the scene and I only referenced the prefab asset from PlayerSync, but it doesnā€™t work yetā€¦

by user 745912722356699257

At this video, the character is not visible in the sceneā€¦:PandaSad:
bandicam_2023-05-02_03-20-39-603.mp4

by user 745912722356699257

Does the scene have a SyncedRoom component? It looks like you are not connected to any networking backend?

Can you check the console log in the browser if it contains info if you have a connection or not (you dont need the ā€œNetworkingā€ component unless you want to change which backend it connects to, only SyncedRoom is necessary, it has settings to make the connection)

Yes! The scene have a SyncedRoom component!

by user 745912722356699257

and hereā€™s my browserā€™s console log!
I configured the networking component in the same way as in the ā€˜sandboxā€™ example, what is the problem?:TrippyBlob:


image.png

by user 745912722356699257

Does anything change when you open a second browser window to the exact same url?

Maybe its because of the room name and something not working there? Altough the logs look correct but just for testing maybe you can enter ā€œtestā€ in the SyncedRoom component?

If you dont find a solution please send a bug report using the menu item in Needle Engine/Report a Bug. Im not at the pc anymore today but can try to look at it tomorrow

Which version are you currently using? (It tells you in the footer of the ExportInfo component)