ES3.GetKeys

public static string[] GetKeys(string filePath, ES3Settings settings)

Description

Gets an array of key names from a file.

Parameters

[table th=”0″]filePath,”[Optional] The relative or absolute path of the file we want to get the keys from.”

settings,”[Optional] The settings we want to use to override the default settings.”[/table]

Returns

An array of key names.

Examples

C#

// Save some keys to a file.
ES3.Save<int>("key1", 123, "myFile.es3");
ES3.Save<int>("key2", 456, "myFile.es3");
ES3.Save<int>("key3", 789, "myFile.es3");
// Now get the keys from file and log them to console.
foreach(var key in ES3.GetKeys("myFile.es3"))
    Debug.Log(key);
// Outputs: 
// key1
// key2 
// key3

JS

// Save some keys to a file.
ES3.Save.<int>("key1", 123, "myFile.es3");
ES3.Save.<int>("key2", 456, "myFile.es3");
ES3.Save.<int>("key3", 789, "myFile.es3");
// Now get the keys from file and log them to console.
foreach(var key in ES3.GetKeys("myFile.es3"))
    Debug.Log(key);
// Outputs: 
// key1
// key2 
// key3