Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Playlists/Playlists.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class Playlists : MelonMod

public static string PlaylistPath => Path.Combine(Directory.GetCurrentDirectory(), "UserData/Playlists");
public static List<CustomPlaylist> LoadedPlaylists { get; private set; } = new();

private static bool SkipUpdate { get; set; }

public override void OnLateInitializeMelon()
{
Expand Down Expand Up @@ -71,10 +73,25 @@ private static void EnsureCreated()
KeyCode.Alpha0
};

public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
if (sceneName == "UISystem_PC")
{
SkipUpdate = false;
}
else
{
SkipUpdate = true;
}
}

public override void OnUpdate()
{
base.OnUpdate();

if (SkipUpdate)
return;

// stops this from triggering when a textbox is focused
if (EventSystem.current?.currentSelectedGameObject is not null)
return;
Expand Down