You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/reference/faq.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,6 +339,50 @@ export class MyScript extends Behaviour
339
339
}
340
340
```
341
341
342
+
## My custom TypeScript class fields don't show up in the Unity/Blender Inspector
343
+
344
+
The Needle component compiler only auto-generates editor stubs for classes that **extend `Behaviour`** (i.e. components). If you define a plain TypeScript class (e.g. a custom data class used inside a component), it will **not** be generated automatically — you need to create the matching class in your editor project yourself.
The component compiler will generate a stub for `WaypointController` (because it extends `Behaviour`), but **not** for `WaypointData`. You must create the matching class manually in your editor project.
367
+
368
+
:::: tabs
369
+
@tab Unity
370
+
Create a C# class in your Unity project:
371
+
```csharp
372
+
[System.Serializable]
373
+
publicclassWaypointData
374
+
{
375
+
publicfloatspeed=1;
376
+
publicGameObjecttarget;
377
+
}
378
+
```
379
+
380
+
@tab Blender
381
+
Custom non-component classes are currently not supported in the Blender integration. As a workaround, consider restructuring your data so that the fields are directly on the component itself, or use separate components instead of nested data classes.
382
+
::::
383
+
384
+
Without this class, the `waypoints` field on `WaypointController` will not be editable in the Inspector.
385
+
342
386
## I created a new script in a sub-scene but it does not work
343
387
When creating new scripts in npmdefs in sub-scenes (that is a scene that is exported as a reference from a script in your root export scene) you currently have to re-export the root scene again. This is because the code-gen that is responsible for registering new scripts currently only runs for scenes with a ``Needle Engine`` component. This will be fixed in the future.
0 commit comments