Input controller not working when deployed on browser

Falling :joy:

by user 832577308644212766

The Mesh Collider that is the floor is not set to static, so i would have guess the rigid body refuses to collide with a dynamic complex mesh.

As i said, the samples do not support Unity Runtime.

Just for clarification, the samples are made for the web - they don’t contain matching C# code to run them inside the Unity Editor out of the box. Often when you’re porting a project you do have matching code for both worlds though :slightly_smiling_face: (same component name and properties in C# and TypeScript)

Thank you for the clarification. What are the benefits of having matching names in C# and Typescript? As far as I understand, Unity runtime and Three.js are quite different, so we can’t simply use the same logic between the two

by user 832577308644212766

Realized, that you must be interacting with the SampleInfo scriptable objects here. You should interact with the Samples Window instead. Click the “open scene” button to easily open samples :+1:
image.png

Needle with its API is as much “close to home” as possible, so for a Unity developer it should be quite intuitive to get started. Same components, same principles.
See this guide on what are the key differences: Scripting Introduction | Needle Engine Documentation

This may have not been super clear so far - one of the main advantages of Needle is that you can do your entire data setup (components on objects, how components interact with each other, calling events between them, …) the same way as you’d typically do in Unity. No changes there. We automatically bring all that data to the web and your TypeScript components take over, have a similar lifecycle with onEnable/onDisable/update and all that, and can reference and interact with each other

When you create a TypeScript file, we automatically generate a matching C# “stub” that contains all the same properties and (empty) methods, so you can add that component to objects and wire everything together as usual

When you’re porting an application you typically already have C# components, so you make matching TypeScript ones that replicate the runtime functionality and they automatically get all the data passed to them

Thanks a lot for these useful info, it makes more sense now.

by user 832577308644212766

I am trying to add a custom script for rotating a cube, as described here Needle Engine Scripting | Needle Engine Documentation. I see a stub .cs file is generated in Assets/Needle/Components.codegen, unfortunately when I try to add this script to the cube object I get this error. Missing something?

by user 832577308644212766

Can you show your console? You might have a compilation error there.

by user 832577308644212766

There is an error indeed

by user 832577308644212766

But it isn’t a compilation error. If you hit clear, it disappears → It isn’t ground breaking.

Perhaps try to restart your Unity, if the issue persists, please file a bug report.

After restarting Unity I was able to add the script :+1:
Now I am getting this new error when launching: Server is not responding - it could mean that another application is already running on port 3000 at https://192.168.1.13:3000
That’s strange because I have nothing running on port 3000. Also it happens only when launching from inside Unity. If I run npm run start from terminal it works

by user 832577308644212766

Actually is not an error, is just a warning

by user 832577308644212766

But it seems the server is working fine even with that warning, so not a big deal

by user 832577308644212766

You should see a console application to appear, that’s the server and it could display some error.
But, if you run it manually and everything works, that’s odd. CC: @herbst🌵