Closed tsafs closed 3 years ago
Your path looks wrong. Try:
const path = require('path')
const fs = require('fs')
const pathToFile = path.join(path.resolve(), 'tilemaps/level1.json')
const exists = fs.existsSync(pathToFile)
console.log('Path: ', pathToFile)
console.log('DoesExist?: ', exists)
Thank you!
Describe the bug On the server-side calling
from a scene causes the following error:
Expectation
I expected the tilemap to be loaded relatively from the scene's path, i.e. from
<project>/src/myGameScene.js
Have a question?
Is there any way to load tilemaps on the server-side? The examples show only examples for levels statically generated by code.