# unity-to-json

> Node.js package to convert unity scene and FBX files into JSON

Latest version **1.2.0** (published 2023-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install unity-to-json
pnpm add unity-to-json
yarn add unity-to-json
bun add unity-to-json
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-09-09 |
| First published | 2023-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=16.0 |
| Dependencies | 5 |
| Unpacked size | 22.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Filipe Meneses |
| Maintainers | filipemeneses |
| Keywords | threejs, three.js, typescript, unity |

## Links

- npm: https://www.npmjs.com/package/unity-to-json
- Repository: https://github.com/filipemeneses/unity-to-json
- Homepage: https://github.com/filipemeneses/unity-to-json#readme
- Issues: https://github.com/filipemeneses/unity-to-json/issues
- npm.io page: https://npm.io/package/unity-to-json

## Dependencies (5)

- [glob](https://npm.io/package/glob.md) ^10.3.4
- [js-yaml](https://npm.io/package/js-yaml.md) ^4.1.0
- [fbx2gltf](https://npm.io/package/fbx2gltf.md) ^0.9.7-p1
- [glob-watcher](https://npm.io/package/glob-watcher.md) ^6.0.0
- [normalize-path](https://npm.io/package/normalize-path.md) ^3.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2023-09-09
- 1.1.0 — 2023-09-08
- 1.0.1 — 2023-09-07
- 1.0.0 — 2023-09-07

## README

# unity-to-json

Node.js package to convert Unity scene and FBX files into JSON

---

[![npm package][npm-img]][npm-url]
[![Build Status][build-img]][build-url]
[![Issues][issues-img]][issues-url]
[![Code Coverage][codecov-img]][codecov-url]
[![Commitizen Friendly][commitizen-img]][commitizen-url]
[![Semantic Release][semantic-release-img]][semantic-release-url]


## Install

```bash
npm install unity-to-json
```

```bash
yarn add unity-to-json
```

## Usage

### Generate files once

```js
import path from 'path';
import { convertUnityProjectToJson } from 'unity-to-json';

const {
  version,
  files
} = await convertUnityProjectToJson({
  unityProjectRootFolderPath: path.resolve('../path/to/unity-project-root'),
});
```

### Generate files and watch for changes

```js
import path from 'path';
import { convertUnityProjectToJson, interpretScene } from 'unity-to-json';

createUnityProjectToJsonWatcher({
  unityProjectRootFolderPath: path.resolve('../path/to/unity-project-root'),
  sceneFilename: 'SampleScene.unity',
  onSceneChange({ version , files }) => {
    // files = all FBX, Unity, Meta files
  }
});
```

## Examples

- [Svelte + Vite + Typescript + Three.js](https://github.com/filipemeneses/svelte-vite-unity-threejs)


[build-img]:https://github.com/filipemeneses/unity-to-json/actions/workflows/release.yml/badge.svg
[build-url]:https://github.com/filipemeneses/unity-to-json/actions/workflows/release.yml
[downloads-img]:https://img.shields.io/npm/dt/unity-to-json
[npm-img]:https://img.shields.io/npm/v/unity-to-json
[npm-url]:https://www.npmjs.com/package/unity-to-json
[issues-img]:https://img.shields.io/github/issues/filipemeneses/unity-to-json
[issues-url]:https://github.com/filipemeneses/unity-to-json/issues
[codecov-img]:https://codecov.io/gh/filipemeneses/unity-to-json/branch/main/graph/badge.svg
[codecov-url]:https://codecov.io/gh/filipemeneses/unity-to-json
[semantic-release-img]:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-release-url]:https://github.com/semantic-release/semantic-release
[commitizen-img]:https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]:http://commitizen.github.io/cz-cli/

---
_Source: https://npm.io/package/unity-to-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
