# Window capture in Unity

**URL:** <https://spout.discourse.group/t/window-capture-in-unity/611>\
**Category:** Support\
**Created:** [May 17, 2024, 4:57am UTC](https://spout.discourse.group/t/window-capture-in-unity/611 "2024-05-17T04:57:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ylva](https://avatars.discourse-cdn.com/v4/letter/y/a9adbd/32.png) [@Ylva](https://spout.discourse.group/u/Ylva)\
**Post date:** [May 17, 2024, 4:57am UTC](https://spout.discourse.group/t/window-capture-in-unity/611/1 "2024-05-17T04:57:02Z")

</div>

I am trying to capture any external window as a texture within the unity game engine and have been pointed to using spout. The main problem I am having is the lack of documentation and the unity plugin being broken and not updated in three years.

My questions: Can this be used to capture an external window to a texture in a unity program? If so, how do I set it up to do that? Is there any documentation for this?

---

<div class="post-metadata">

**Author:** ![spout](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@spout](https://spout.discourse.group/u/spout)\
**Post date:** [May 17, 2024, 5:24am UTC](https://spout.discourse.group/t/window-capture-in-unity/611/2 "2024-05-17T05:24:26Z")

</div>

What plugin are you using? I assume it’s the one by [Keijiro](https://github.com/keijiro/KlakSpout) which is the most used, although it is 3 years old as you say. There are also a number of others listed [here](https://leadedge.github.io/spout-projects.html).

I don’t know that any of these will do screen capture. You can try [this application](https://github.com/leadedge/Win32CaptureSample). Operation is self-explanatory. This will produce Spout output, and then you will need to import that to Unity.

---

<div class="post-metadata">

**Author:** ![Ylva](https://avatars.discourse-cdn.com/v4/letter/y/a9adbd/32.png) [@Ylva](https://spout.discourse.group/u/Ylva)\
**Post date:** [May 17, 2024, 9:51am UTC](https://spout.discourse.group/t/window-capture-in-unity/611/3 "2024-05-17T09:51:26Z")

</div>

Thanks for the links. I assumed the plugin by Keijiro was THE plugin, as it is the one linked on the main spout website.  
I’ll take a closer look at the application later but looks like what I’m after.

---

<div class="post-metadata">

**Author:** ![Ylva](https://avatars.discourse-cdn.com/v4/letter/y/a9adbd/32.png) [@Ylva](https://spout.discourse.group/u/Ylva)\
**Post date:** [May 17, 2024, 4:18pm UTC](https://spout.discourse.group/t/window-capture-in-unity/611/4 "2024-05-17T16:18:35Z")

</div>

So I am now using sloopidoopi/Spout4Unity to get the output from the application you linked and it works great when the script is attached to a mesh renderer object. Ideally it would work with canvas renderers as well, but I’ll have to mess with that after work. Thanks for your help 😁
