protected override void DrawUnifiedElementInternal(Rect rect, T old_value) { T new_value = DrawValueInternal(field_rect, old_value); if (new_value.NotEqualsEX(old_value)) { GetProperty().SetContentValues(new_value); } if (GUI.Button(browse_rect, "Browse")) { ModalEditorWindow.OpenWindow("Browse", delegate(EditorGUIElement_Container_Auto container) { container.AddChildren( Project.GetExternalAssetInfos <T>() .Narrow(predicate) .Convert(a => CreateAssetInfoElement(a)) ); }); } if (GUI.Button(clear_rect, "X")) { GetProperty().SetContentValues(null); } }
public override IEnumerable <AssetInfo> GetAssetInfos() { return(Project.GetExternalAssetInfos(GetProperty().GetPropertyType()) .PrependIfNot(should_force_non_null, (AssetInfo)null)); }