C# Namespaces from TS Files?

Is there a way to define namespaces for the generated C# components?
Right now all scripts are generated inside Needle/Components.codegen including those that are created on a npmdef, so if i have, lets say a component cameraController as a dependency but for some reason, you also want a cameraController specific for this project, obviously you’ll have troubles that can be prevented by usage of some sort of namespace.

There’s also a cool thing about namespaces in Unity, that is the organization that is given when you add a new component (it displays the namespace like Needle.typescript.GeneratedComponents) and grouping inside a specific category (although i know this is done through editor scripting).

Is there a specific Needle way for this?

I’m sorry, I couldn’t find a response. :cactus:

Hi, this is currently not supported by the component compiler at the moment.

If you need more control right now you can still tag your TS component to not be automatically generated and add the C# script manually.

Another way would be to organize your code using AssemblyDefinition files.

1 Like

“…currently not supported…” sounds like you guys are thinking into implementing this at some point? just for curiosity. :face_with_monocle:

It’s on the features list already for a future version, yes, just no ETA at the moment

1 Like

This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.