{"id":26514,"library":"ts-to-unitycs","title":"ts-to-unitycs","description":"A transpiler that converts a TypeScript-like DSL into Unity C# code. Version 1.0.0 – initial release with single-cycle translation, no ongoing maintenance indicated. Differentiates by enabling Unity developers to write game logic in a syntax familiar from TypeScript while generating standard C# scripts for the Unity engine. No release cadence documented; likely a one-off or early-stage tool.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install ts-to-unitycs","lang":"bash","label":"npm"},{"cmd":"yarn add ts-to-unitycs","lang":"bash","label":"yarn"},{"cmd":"pnpm add ts-to-unitycs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for TypeScript parsing and AST generation.","package":"typescript","optional":false}],"imports":[{"note":"Only a default export is available at version 1.0.0; named import will fail.","wrong":"const { transpile } = require('ts-to-unitycs')","symbol":"default (transpile function)","correct":"import transpile from 'ts-to-unitycs'"},{"note":"Module exports a single default function; destructuring assignment is not supported.","wrong":"import { t } from 'ts-to-unitycs'","symbol":"transpile (as function)","correct":"import t from 'ts-to-unitycs'"},{"note":"Type imports require 'import type' or 'import { TranspilerOptions as _ }' to avoid runtime value import.","wrong":"import { TranspilerOptions } from 'ts-to-unitycs'","symbol":"TranspilerOptions","correct":"import type { TranspilerOptions } from 'ts-to-unitycs'"}],"quickstart":{"code":"import transpile from 'ts-to-unitycs';\nimport { writeFileSync } from 'fs';\n\nconst dslCode = `\nclass PlayerController {\n    private speed: number = 10;\n    public Move(direction: Vector3): void {\n        // translate\n    }\n}`;\n\ntry {\n    const csharpCode: string = transpile(dslCode);\n    writeFileSync('PlayerController.cs', csharpCode, 'utf8');\n    console.log('Generated PlayerController.cs');\n} catch (err) {\n    console.error('Transpilation failed:', err);\n}","lang":"typescript","description":"Transpile a TypeScript-like DSL snippet to Unity C# and write to a .cs file."},"warnings":[{"fix":"Manually review and adjust output for production use.","message":"The generated C# code may have incomplete syntactic coverage; use with caution.","severity":"breaking","affected_versions":"1.0.0"},{"fix":"Refer to the documentation for supported features.","message":"Only a subset of TypeScript features are supported (e.g. no async/await, generics limited).","severity":"gotcha","affected_versions":"1.0.0"},{"fix":"Contribute tests or use alternative tools.","message":"No official tests or CI pipeline; reliability not guaranteed.","severity":"gotcha","affected_versions":"1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install ts-to-unitycs` or add to package.json.","cause":"Package not installed or incorrectly referenced.","error":"Cannot find module 'ts-to-unitycs'"},{"fix":"Use `import transpile from 'ts-to-unitycs'` instead of `import { transpile } from 'ts-to-unitycs'`.","cause":"Incorrect import of the default export as a named import.","error":"transpile is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}