Search Issue Tracker

Won't Fix

Votes

0

Found in

5.5.1f1

Issue ID

899213

Regression

No

ISerializationCallbackReceiver example

Scripting

-

The example sritp on this page: https://docs.unity3d.com/2017.1/Documentation/ScriptReference/ISerializationCallbackReceiver.html
https://docs.unity3d.com/ScriptReference/ISerializationCallbackReceiver.html

should be changed
from:
public List<int> _keys = new List<int> { 3, 4, 5 };
public List<string> _values = new List<string> { "I", "Love", "Unity" };

//Unity doesn't know how to serialize a Dictionary
public Dictionary<int, string> _myDictionary = new Dictionary<int, string>();

to:
public List<int> _keys = new List<int>();
public List<string> _values = new List<string>();

//Unity doesn't know how to serialize a Dictionary
public Dictionary<int, string> _myDictionary = new Dictionary<int, string>{ { 3, "I" }, { 4, "Love" }, { 5, "Unity" } };

  1. Response avatar

    Resolution Note:

    Resolving and Closing ("won't fix") as part of the big docs bug amnesty (Jan 2018). Due to limited resources we are drawing a line under these older bugs and we are now focusing our work on the newer incoming bugs from the docs web site feedback system.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.