Skip to content

Commit 726d6af

Browse files
authored
Merge pull request #66 from nicoco007/bind-async-installers
Allow binding against AsyncInstallers
2 parents 84e677c + 2a4a684 commit 726d6af

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

SiraUtil/SiraUtil.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
</Reference>
5757
<Reference Include="BGLib.AppFlow">
5858
<HintPath>$(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll</HintPath>
59+
<Publicize>True</Publicize>
5960
<Private>False</Private>
6061
</Reference>
6162
<Reference Include="BGLib.DotnetExtension">

SiraUtil/Zenject/Harmony/ContextDecorator.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using HarmonyLib;
1+
using BGLib.AppFlow.Initialization;
2+
using HarmonyLib;
23
using SiraUtil.Zenject.Internal;
34
using System;
45
using System.Collections.Generic;
@@ -39,6 +40,10 @@ internal static void Prefix(ref Context __instance, ref List<InstallerBase> norm
3940
foreach (var installerPrefab in installerPrefabs)
4041
bindings.Add(new ContextBinding(__instance, installerPrefab.GetType(), accessor));
4142

43+
if (__instance is AsyncSceneContext asyncSceneContext)
44+
foreach (var asyncInstaller in asyncSceneContext._asyncInstallers)
45+
bindings.Add(new ContextBinding(__instance, asyncInstaller.GetType(), accessor));
46+
4247
if (__instance is SceneDecoratorContext decorator)
4348
_recentlyInstalledDecorators.Add(decorator);
4449

0 commit comments

Comments
 (0)