unity-to-json
v1.2.0
Published
Node.js package to convert unity scene and FBX files into JSON
Downloads
10
Maintainers
Readme
unity-to-json
Node.js package to convert Unity scene and FBX files into JSON
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
}
});