@needle-tools/needle-component-compiler

1.11.1 • Public • Published

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")]

Readme

Keywords

none

Package Sidebar

Install

npm i @needle-tools/needle-component-compiler

Weekly Downloads

149

Version

1.11.1

License

none

Unpacked Size

79.7 kB

Total Files

8

Last publish

Collaborators

  • marwi123
  • herbst