How to get Editor directory path

Hello,

I am working on implementing a Babylon.JS Editor plugin and need to read some folders from the Editor Project side to compress several folders to a zip file. Does anyone know which functionality I should use to get the Editor path in a Plugin? I used __dirname but it returned the plugin’s build/src folder which wasn’t I wanted. Thank you.

cc @julien-moreau

2 Likes

Hi @ZzMarmot !

You can use

import { Tools } from "babylonjs-editor";

...

console.log(Tools.GetAppPath());
1 Like

Thank you @julien-moreau This will return me to the App path but I would like to access the BabylonJS Editor project path. Is there any way to do that in Plugin side?

I found what I need. It is WorkSpace.DirPath.

1 Like

Hi @ZzMarmot perfect!!

Don’t hesitate to share your extension development feedback :slight_smile: