#How to use the SerializedDictionary class from UnityEngine.Rendering?

1 messages · Page 1 of 1 (latest)

rotund pebble
#

Whenever I try to use it, I get this error, most likely because it seems that the keys and values need to be the same length:

ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <5a8bfa4804234695888f9129fe33846c>:0)
UnityEngine.Rendering.SerializedDictionary`4[K,V,SK,SV].OnAfterDeserialize () (at ./Library/PackageCache/com.unity.render-pipelines.core/Runtime/Common/SerializedDictionary.cs:142)
```But there doesn't seem to be a way to increase the keys and values length at the same time, meaning they will always be (0, 0). So how do I use it?
ornate pollen
#

are you just trying to get a serialized dictionary?

#

unless you're using other UnityEngine.Rendering stuff, just getting one of the third party assets would probably be easier