Method ListJsonFilesAsync
ListJsonFilesAsync(string, bool, CancellationToken)
Lists the *.json documents a content package should read - the asynchronous, platform-neutral
counterpart of ListJsonFiles(string) / ListJsonFilesRecursive(string).
A local package (a mod under persistentDataPath) is enumerated from disk exactly as before. A base
package is not: on a packed platform StreamingAssets is a URL, and a URL cannot be enumerated. That is
precisely why the base ships a single index.json - that file is the listing, so the
answer is either it or nothing.
public static Task<string[]> ListJsonFilesAsync(string directory, bool recursive, CancellationToken ct = default)
Parameters
directorystringrecursiveboolctCancellationToken