Skip to content

Commit 89e1863

Browse files
authored
Update __buildScenes.js
1 parent 0f0145f commit 89e1863

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Workspace/Resources/__buildScenes.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ Workspace.newF("__buildScenes", function() { // function for building the worksp
1010

1111

1212
sceneFiles.forEach( file => {
13+
14+
// gets the file's name and creates a new Scene type
1315
let name = file.replace(".unity", ""); // name of the scene
14-
const scene = new this.Scene(name); // creates a new scene typing
16+
const scene = new this.Scene(name); // creates a new Scene type
1517

1618
// sets the directory properties
1719
scene.dataDir = this.scenesDir+"/"+file
1820
scene.metaDir = scene.dataDir+".meta";
1921

22+
23+
// read the files
2024
let data = fs.readFileSync(`${this.scenesDir}/${file}`, 'utf8'); // scene data
2125
let meta = fs.readFileSync(`${this.scenesDir}/${file}.meta`, 'utf8'); // scene metadata
2226

27+
28+
// translate and push
2329
scene.translate(data, meta); // translates the scene's metadata and data into usable JSON data
2430
this.scenes.push(name, scene); // pushes the new scene into the scene group
2531
});

0 commit comments

Comments
 (0)