Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

DictionaryIgnoredEntries.nullKeyEntryIndices

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public int[] nullKeyEntryIndices;

Description

The serialized array indices of the null-key placeholder rows that the Inspector shows but the live dictionary excludes.

The Inspector keeps a row with a null key so a user can assign a valid key to it, but a null key can't exist in the runtime Dictionary, so Unity excludes these rows from the live dictionary. The indices are positions in the dictionary's underlying serialized array of key/value pairs, and are stable across Inspector re-sorts. This array is empty when the dictionary has no null-key rows.