Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/snap-ghosts
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Jan 1, 2024
2 parents 2733ea6 + 23fb016 commit 1b348f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
Support/steam
lfs: true # We don't use LFS, but it adds no time, and leave it here in case we do at some point later
- name: Setup steamcmd
uses: CyberAndrii/[email protected]
Expand All @@ -756,10 +758,10 @@ jobs:
path: build_windows_openxr
- name: Upload Build
run: |
pip install -U j2cli
j2 Support/steam/app.vdf.j2 > build_windows_openxr/app.vdf
j2 Support/steam/main_depot.vdf.j2 > build_windows_openxr/main_depot.vdf
j2 Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
pip install -U jinjanator
jinjanate Support/steam/app.vdf.j2 > build_windows_openxr/app.vdf
jinjanate Support/steam/main_depot.vdf.j2 > build_windows_openxr/main_depot.vdf
jinjanate Support/steam/installscript_win.vdf.j2 > build_windows_openxr/installscript_win.vdf
steamcmd +login $STEAM_USERNAME +run_app_build $(pwd)/build_windows_openxr/app.vdf +quit
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
Expand Down
12 changes: 9 additions & 3 deletions Assets/Scripts/SketchControlsScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2353,10 +2353,16 @@ GrabWidgetData GetBestWidget(List<GrabWidgetData> candidates,
GrabWidgetData best = null;
for (int i = 0; i < candidates.Count; ++i)
{
if (candidates[i].m_NearController &&
(best == null || candidates[i].m_ControllerScore > best.m_ControllerScore))
var candidate = candidates[i];
if (!candidate.m_NearController) continue;

// For media widgets - only select from the active layer
if (candidate.m_WidgetScript is MediaWidget
&& candidate.m_WidgetScript.Canvas != App.Scene.ActiveCanvas) continue;

if (best == null || candidate.m_ControllerScore > best.m_ControllerScore)
{
best = candidates[i];
best = candidate;
}
}
return best;
Expand Down

0 comments on commit 1b348f6

Please sign in to comment.