The GetInt
method retrieves an integer value associated with a specified key from the metadata. If the key does not exist, it returns a default value provided by the user.
The GetInt
method retrieves an integer value associated with a specified key from the metadata. If the key does not exist, it returns a default value provided by the user.
Use this method when you need to retrieve an integer value from the metadata. Provide the key name as a string and a default integer value that will be returned if the key is not found.
// Example usage of GetInt method Editor.MetaData metaData = new Editor.MetaData(); int value = metaData.GetInt("playerScore", 0); // If "playerScore" exists in the metadata, its value is returned. // Otherwise, the default value 0 is returned.