Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change the value of Desktop Index, I'm trying to work with mutiple displays at the same time, Please help!! #62

Open
Infinix31 opened this issue Dec 22, 2023 · 2 comments

Comments

@Infinix31
Copy link

No description provided.

@11305064-HenryWang
Copy link

same here,please reply if you solve this issue.thanks!

@11305064-HenryWang
Copy link

using UnityEngine;

namespace uWindowCapture
{

public class UwcDesktopTextureManager : UwcWindowTextureManager
{
    void Start()
    {
        UwcManager.onDesktopAdded.AddListener(OnWindowAdded);
        UwcManager.onDesktopRemoved.AddListener(OnWindowRemoved);
        foreach (var pair in UwcManager.windows)
        {
            OnWindowAdded(pair.Value);
        }
    }

    void OnWindowAdded(UwcWindow window)
    {
        if (window.parentWindow != null) return; // handled by UwcWindowTextureChildrenManager
        if (!window.isVisible || !window.isDesktop || window.isBackground) return;

        window.RequestCapture();
        AddWindowTexture(window);
    }

    void OnWindowRemoved(UwcWindow window)
    {
        RemoveWindowTexture(window);
    }
}

}
solve this by replacing UwcAltTabWindowTextureManager to this in horizontallayout scene.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants