Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit beb66be

Browse files
Adding assets to dictionary for global selection lookup
1 parent 06d80b8 commit beb66be

File tree

1 file changed

+9
-0
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+9
-0
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/LocksView.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,18 @@ public void Load(List<GitLock> locks)
210210

211211
var scrollIndex = (int)(scrollValue / Styles.LocksEntryHeight);
212212

213+
assets.Clear();
214+
213215
gitLockEntries = locks.Select(gitLock => {
214216
var gitLockEntry = new GitLockEntry(gitLock);
215217
LoadIcon(gitLockEntry);
218+
219+
var assetGuid = AssetDatabase.AssetPathToGUID(gitLock.Path);
220+
if (!string.IsNullOrEmpty(assetGuid))
221+
{
222+
assets.Add(assetGuid, gitLockEntry);
223+
}
224+
216225
return gitLockEntry;
217226
}).ToList();
218227

0 commit comments

Comments
 (0)