Skip to content

NPM package to convert unity scene and FBX files into JSON

License

Notifications You must be signed in to change notification settings

filipemeneses/unity-to-json

Repository files navigation

unity-to-json

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


npm package Build Status Issues Code Coverage Commitizen Friendly Semantic Release

Install

npm install unity-to-json
yarn add unity-to-json

Usage

Generate files once

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

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

About

NPM package to convert unity scene and FBX files into JSON

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published