🚀 DAY 4 OF LAUNCH WEEK:Introducing Socket Scanning for OpenVSX Extensions.Learn more →
Socket
Book a DemoInstallSign in
Socket

@needle-tools/needle-component-compiler

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@needle-tools/needle-component-compiler

Compile mock unity components from typescript

next
latest
Source
npmnpm
Version
1.12.2-b540994
Version published
Maintainers
2
Created
Source

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

Contact ✒️

🌵 Needle • Github • Twitter • Discord • Forum • Youtube

FAQs

Package last updated on 06 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts