Example #1
0
 // Called when the component looses focus
 private void OnDisable()
 {
     serializedObjet.Update();
     // empty list
     list.ClearArray;
     // Reading access to the target's fields is okey 
     // as long as you are sure they are set at the moment the editor is closed
     foreach(var key in _target.myDoctionary.keys)
     {
         list.AddArrayElementAtIndex(list.arraySize);
         var element = list.GetArrayElementAtIndex(list.arraySize - 1);
         element.stringValue = key;
     }
     serialzedObject.ApplyModifiedProperties;
 }