Skip to content

Commit

Permalink
Merge pull request #9 from Unity-Technologies/dev
Browse files Browse the repository at this point in the history
made multi-select in asset list work translate to project window.
  • Loading branch information
alffanclub authored May 4, 2017
2 parents e16c8ad + 1063a59 commit 00bf807
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,21 @@ protected override void DoubleClickedItem(int id)

protected override void SelectionChanged(IList<int> selectedIds)
{
List<Object> selectedObjects = new List<Object>();
List<AssetBundleModel.AssetInfo> selectedAssets = new List<AssetBundleModel.AssetInfo>();
foreach (var id in selectedIds)
{
var assetItem = FindItem(id, rootItem) as AssetBundleModel.AssetTreeItem;
if (assetItem != null)
{
Object o = AssetDatabase.LoadAssetAtPath<Object>(assetItem.asset.fullAssetName);
selectedObjects.Add(o);
Selection.activeObject = o;
selectedAssets.Add(assetItem.asset);
}
}
m_Controller.SetSelectedItems(selectedAssets);
Selection.objects = selectedObjects.ToArray();
}
protected override bool CanBeParent(TreeViewItem item)
{
Expand Down

0 comments on commit 00bf807

Please sign in to comment.