Any hand holding tutorials out there for how this scripting works?

So I just wanted to do a simple test of a button starts and animation. I thought I went through the guide correctly. Made a project, made a raw needle scene, wrote a simple test .ts script, put the script into the proj/needle/scene/src/scripts and nothing happens. No script is being generated into the assets/needle folder for me to use in my scene? I do have the component generator on the extport when I generated the new scene. I even took one of the sample .tx and js files and dropped it in the /src/scripts. Nothing is getting generated, did I miss something? Please excuse me if this is a simple RTFM issue, I’m green on the js/ts stuff.

Original Post on Discord

by user 740595126971400252

Hey, could you try enabling/disabling the component compiler and then saving the script again? There have been issues that the change wasnt detected. Also keep an eye on the console, it should print a message saying that it detected a change. If that doesnt happen it means that the watcher failed for some reason

Let me know if that fixes the problem for you :slightly_smiling_face:

I’ll let you know in just a bit, i had to run out

by user 740595126971400252

Sorry for the late reply, that didn’t fix it. But the update that I saw did.
Thank you.
Any good TS for unity tutorials you’d recommend, apparently I suck at it?

by user 740595126971400252

No problem - glad to hear its fixed.

Unfortunately tutorials are a sparse still - generally it’s not so different from regular typescript with only a few concepts that we added and that you would need to learn (e.g. @serializable: Needle Engine Scripting | Needle Engine Documentation) which is mostly explained here: Needle Engine Scripting | Needle Engine Documentation

But you can always ask here for help if you struggle of course.

would I be able to use the babylon unity with this or is their generated typescript different?

by user 740595126971400252

No you won’t be able to do that

What would be your reason for wanting to do that? Because you are more familiar with babylon? Or any feature that is interesting that we dont have yet?

Because babylon spits out boilerplate ts files straight inside unity with component types.

Create/babylon/babylon TypeScript/ Type of component

by user 740595126971400252

What do these files contain? Could you share an example?

With us its the other way around and we produce components for Unity and Blender from Typescript :blush: