Skip to content

Commit e4d426b

Browse files
committed
new faq for user scripts which are not found in component menu
1 parent 2dd1432 commit e4d426b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

documentation/reference/faq.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,12 @@ Please check that you're not accidentally in the Inspector's `Debug` mode – sw
366366
- Needle uses typescript / javascript for components and generates C# stubs for them.
367367
- Components that already have matching JS will show that in the Inspector.
368368

369+
## My custom TypeScript component doesn't show up in the Unity/Blender component menu
370+
371+
Make sure your script is located inside the web project's `src/scripts` folder. The Needle component compiler only picks up scripts in this folder to generate the matching Unity stub components / Blender component panels — components placed elsewhere won't appear in Unity's or Blender's component menu.
372+
373+
You can change which folder is watched via the `scriptsDirectory` setting in [needle.config.json](/docs/reference/needle-config-json) (it defaults to `src/scripts`). When you change the config, restart Blender for the new setting to take effect.
374+
369375
## Does C# component generation work with javascript only too?
370376
While generating C# components does technically run with vanilla javascript too we don't recommend it and fully support it since it is more guesswork or simply impossible for the generator to know which C# type to create for your javascript class. Below you find a minimal example on how to generate a Unity Component from javascript if you really want to tho.
371377

0 commit comments

Comments
 (0)