public DictionaryEditorDrawer(Editor host, string dataHeadName, Dictionary <TKey, TValue> data, ValueDrawer drawer) { this.host = host; this.dataHeadName = dataHeadName; this.data = data; this.drawer = drawer; RefreshData(); }
/// <inheritdoc /> protected override void DoRandomize() { if (RandomUtils.Bool()) { Value = null; } else { Value = Type.DefaultValue(); if (!IsNull) { ValueDrawer.Randomize(false); } } }
protected virtual void DrawValue(ref Rect rect, SerializedProperty property, GUIContent label) { rect.x += ValuePadding; rect.width -= ValuePadding; if (ValueDrawer.HasChildern) { ValueDrawer.DrawChildern(ref rect); } else { ValueDrawer.Draw(ref rect); } rect.x -= ValuePadding; rect.width += ValuePadding; }