@needle-tools/needle-component-compiler
v1.11.1
Published
Compile mock unity components from typescript
Downloads
652
Readme
Typescript to Unity component
Little helper package to transpile typescript files to Unity C# components.
Please run npm install
first before using.
Usage
node <path to>/component-compiler.js <output_directory> <path_to/my_script.ts>
Command decorators
@dont-generate-component
add before class to skip generating a component@generate-component
to enforce generating a component (not required)@serializeField
field decorator, similar to[SerializeField]
in Unity@nonSerialized
field or method decorator to skip generating c# code for a field or a method, similar to[NonSerialized]
in Unity@type MyNamespace.MyType
decorator for fields or classes, specifiy C# type of field or class@ifdef MY_IFDEF
field decorator only at the moment@tooltip My Text
field decorator, generates a Unity[Tooltip("My Text")]
@contextmenu MethodName
method decorator, generates a[ContextMenu("MethodName")]