Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.2.1]
### Fixed
- Update active editor when selecting a new item with the keyboard


## [2.2.0]
### Added
Expand Down
17 changes: 15 additions & 2 deletions Scripts/Editor/Browser/BrowserTreeView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEditor;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;

Expand Down Expand Up @@ -30,7 +31,6 @@ public BrowserTreeView(TreeViewState state, MultiColumnHeader multiColumnHeader)
private void Initialize()
{
showAlternatingRowBackgrounds = true;
// showBorder = true;
Reload();
}

Expand Down Expand Up @@ -71,6 +71,19 @@ protected override bool CanMultiSelect(TreeViewItem item)
return false;
}

protected override void SelectionChanged(IList<int> selectedIds)
{
if (selectedIds.Count != 1)
return;

TreeViewItem item = FindItem(selectedIds[0], rootItem);

if (item is BrowserTreeViewItem treeViewItem)
{
ItemClicked?.Invoke(treeViewItem);
}
}

protected override void SingleClickedItem(int id)
{
TreeViewItem item = FindItem(id, rootItem);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.brunomikoski.scriptableobjectcollection",
"displayName": "Scriptable Object Collection",
"version": "2.2.0",
"version": "2.2.1",
"unity": "2021.2",
"description": "A library to help improve the usability of Unity3D Scriptable Objects by grouping them into a collection and exposing them by code or nice inspectors!",
"keywords": [
Expand Down