Node.js package to convert Unity scene and FBX files into JSON
npm install unity-to-json
yarn add unity-to-json
import path from 'path';
import { convertUnityProjectToJson } from 'unity-to-json';
const {
version,
files
} = await convertUnityProjectToJson({
unityProjectRootFolderPath: path.resolve('../path/to/unity-project-root'),
});
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
}
});