https://github.com/shysolocup/unityscript
A JavaScript-to-C# Compiler for Unity
https://github.com/shysolocup/unityscript
compiler game-development gamedev javascript js nodejs nodejs-api nodejs-modules transpiler unity unity2d unity3d unityscript
Last synced: 8 months ago
JSON representation
A JavaScript-to-C# Compiler for Unity
- Host: GitHub
- URL: https://github.com/shysolocup/unityscript
- Owner: shysolocup
- License: mit
- Created: 2024-03-02T06:54:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T17:19:14.000Z (almost 2 years ago)
- Last Synced: 2025-04-02T11:01:40.485Z (9 months ago)
- Topics: compiler, game-development, gamedev, javascript, js, nodejs, nodejs-api, nodejs-modules, transpiler, unity, unity2d, unity3d, unityscript
- Language: JavaScript
- Homepage: https://npmjs.com/package/unityscript
- Size: 432 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[dear penguins]: => (
I KNOW IT'S A TRANSPILER NOT A COMPILER NERD SILENCE
)
[dear paige]: => (
no
)
[dear penguins]: => (
yes
)
[dear paige]: => (
Well, if we're talking semantics, technically speaking, a compiler compiles source code into machine code,
while a transpiler translates source code from one programming language to another.
So, in the spirit of accuracy, let's transpile "compiler" into "transpiler" in the README! 😜
)
[dear penguins]: => (
nuh uh
)
[dear paige]: => (
yuh uh, no returns...
)
---
UnityScript is an early access JavaScript to C# compiler and API wrapper package for the game engine Unity
⚠️ __PLEASE NOTE:__
this package is currently in early access and is far from finished ⚠️
### Installations
stable release versions are on [npm](https://npmjs.com/package/unityscript)
experimental versions are on [github](https://github.com/paishee/unityscript)
```console
npm install unityscript
```
```console
npm install paishee/unityscript
```
---
```js
const { Workspace } = require('unityscript');
const workspace = new Workspace();
workspace.on("ready", (ctx) => {
const scene = ctx.scenes.first();
let cube = scene.spawn(Cube, "cubert", {
localPosition: { x: 5, y: 5, z: 5 },
});
});
workspace.open("C:/Users/owner/MyProject");
```
## Disclaimer
this project is created out of pure boredom and coolness
this project and the developers behind it are:
- not associated with Unity or its developers
- not responsible for anything created
## Collaborators
