SerializedDictionary
Class in Yarn.Unity​
Inherits from IDictionary2`

Summary

An IDictionary<TKey,TValue> that can be serialized as part of a Unity object.
public class SerializedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ISerializationCallbackReceiver

Remarks

Prior to Unity 2020, dictionaries cannot be directly serialized by Unity. This class is a workaround; it provides an API identical to Dictionary<TKey, TValue> , and stores its contents as two List<T> s: one for TKey , and one for TValue .

Type Parameters

Name
Description
TKey
The type of key used in the dictionary.
TValue
The type of value used in the dictionary.

Indexers

Name
Description
​this[TKey key]​
​

Methods

Name
Description
​Add(TKey,TValue)​
​
​Clear()​
​
​ContainsKey(TKey)​
​
​GetEnumerator()​
​
​Remove(TKey)​
​
​

Properties

Name
Description
​Count​
​
​IsReadOnly​
​
​Keys​
​
​Values​
​
Export as PDF
Copy link
Edit on GitHub
On this page
Summary
Remarks
Type Parameters
Indexers
Methods
Properties