Class SerializedDictionary<K, V>
Unity can't serialize Dictionary so here's a custom wrapper that does. Note that you have to extend it before it can be serialized as Unity won't serialized generic-based types either.
Implements
Inherited Members
Namespace: UnityEngine .Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[Serializable]
public class SerializedDictionary<K, V> : SerializedDictionary<K, V, K, V>, IDictionary<K, V>, ICollection<KeyValuePair<K, V>>, IReadOnlyDictionary<K, V>, IReadOnlyCollection<KeyValuePair<K, V>>, IEnumerable<KeyValuePair<K, V>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable, ISerializationCallbackReceiver
Type Parameters
Name | Description |
---|---|
K | The key type |
V | The value |
Examples
public sealed class MyDictionary : SerializedDictionary<KeyType, ValueType> {}
Methods
Name | Description |
---|---|
Deserialize |
Conversion to serialize a key |
Deserialize |
Conversion to serialize a value |
Serialize |
Conversion to serialize a key |
Serialize |
Conversion to serialize a value |