KeyValue Methods
v4.0
Most often you'll grab values direction from the Dictionaries Methods, but if you have a KeyValue object, there are methods you can use to manage data.
KeyValue Structure
A KeyValue
object has a string
key
, as well as a List<KeyValueList>
values
. This is where all the data is stored.
Each KeyValueList
object has a string
typeName
and a List<KeyValueObject>
objects
.
Each KeyValueObject
has a object
obj
, which is a cached object value, and a DictionariesObject
DictionariesObject
. (The actual variable is private
_dictionariesObject
, but the Property
DictionariesObject
is how we get and set the value.
It is not recommended to go so far into the data structure that you are managing KeyValueObject
values directly, but instead to use the built in methods.
Get Methods
Get data out, or information.
Add(), Remove(), and Set() Methods
Never set or add the values on the Scriptable Objects directly! Only set the values in the Game[Type]
objects, such as GameCondition
, GameStat
, etc.
Last updated