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

Commit c62058c

Browse files
Adding comment to code
1 parent 699a576 commit c62058c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs

+7
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ private static void OnLocksUpdate()
222222
guidsLocks.Add(g);
223223
}
224224

225+
// https://github.com/github-for-unity/Unity/pull/959#discussion_r236694800
226+
// We need to repaint not only the project window, but also the inspector.
227+
// so that we can show the "this thing is locked by X" and that the IsOpenForEdit call happens
228+
// and the inspector is disabled. There's no way to refresh the editor directly
229+
// (well, there is, but it's an internal api), so this just causes Unity to repaint everything.
230+
// Nail, meet bazooka, unfortunately, but that's the only way to do it with public APIs ¯_(ツ)_/¯
231+
225232
//EditorApplication.RepaintProjectWindow();
226233
UnityEditorInternal.InternalEditorUtility.RepaintAllViews();
227234
}

0 commit comments

Comments
 (0)