private void CheckInitialize(SerializedProperty property, GUIContent label) { if (_dict == null) { var target = property.serializedObject.targetObject; _dict = fieldInfo.GetValue(target) as DictionaryIntGameobject; if (_dict == null) { _dict = new DictionaryIntGameobject(); fieldInfo.SetValue(target, _dict); } changedKey = new KeyValuePair <int, int>(-1, -1); _orderedKeys = new List <int>(); foreach (var kvp in _dict) { _orderedKeys.Add(kvp.Key); } } }