How to find and load all JsonAssets to custom editor window

Hi guys, is there a way to use script to find and load all .json files within a specific content directory to a custom editor window (after a button clicked somewhere ofc).

My planned layout is that I have multiple rows, each has 2 columns: one will display the Json file name, and the other display its properties. Currently I have not found a proper way to load them on window opened.

Thanks in advance!

Hi,
not sure if this is what you are looking for, but i guess you can use System.IO.Directory.EnumerateFiles to list all json files with searchParam pattern parameter.
Use Globals.ProjectContentFolder to get the project Content directory.

A very simple example using HOWTO: Create a custom editor window | Flax Documentation

2 Likes

Perfect! Thats exactly what I needed!
It should work now :smiley:
Thanks a bunch!!!