KeyValue Methods
v4.0
KeyValue Structure
Get Methods
// Get a value from the list. Note the Type must be provided
var firstItem = KeyValue.Value<Sprite>();
var randomItem = KeyValue.Value<Sprite>(true);
var itemInIndex4 = KeyValue.Value<Sprite>(false, 4);
// Get all values from the list as an array
var allStrings = KeyValue.Values<string>();
var allAudioClips = KeyValue.Values<AudioClip>();
// Get all values as a list
var allBools = KeyValue.ValuesList<bool>();
// Get all KeyValueObject objects as an array
Texture2D[] portraitObjects = keyValue.ValueObjects<Texture2D>();
// Get all KeyValueObject objects as a list
List<Texture2D> portraitObjects = keyValue.ValueObjectsList<Texture2D>();
// Number of different types in use on this KeyValue
int typesInUse = KeyValue.TypesInUse;
// Get the names of each type in use
string[] typesInUse = KeyValue.Types;
// Get the total objects in the list (each item in any list is one object)
int totalObjects = KeyValue.TotalObjects;Add(), Remove(), and Set() Methods
Last updated