GithubHelp home page GithubHelp logo

glutoblop / unitywindowscapture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phylliida/unitywindowscapture

0.0 1.0 0.0 114.62 MB

A framework to capture individual windows or the entire desktop in Unity

License: MIT License

C# 83.47% ShaderLab 2.62% C++ 11.70% Objective-C 1.88% C 0.33%

unitywindowscapture's Introduction

UnityWindowsCapture

A framework to capture individual windows or the entire desktop in Unity. This is a large part of the code I wrote to make Multiscreens.

Right now this uses GDI in an optimized way to capture things on windows 7+. As long as you are careful about your capturing rates you can run at 40-50 fps.

I also have code for using the Desktop Capture API (Windows 8+) in here which seems to be what BigScreen and Virtual Desktop use to capture windows in realtime while running at 90 fps. See DesktopCapture.cs and usage in ExampleUsage.cs

See ExampleUsage.cs in the scene "Test" for an example of how to use this. I'll add a more detailed tutorial later as well.

Edit: I added this code to this (all credit goes to Vitaly Chashin) which lets you simulate a web browser and capture its contents at a very fast rate, almost as fast as the Windows 8+ capture API. As far as I know this should work on windows 7+. You can have as many as you want at a time, it runs most websites great, and you can have windows with any resolution. Here is a screen shot of it running

Right now you can't interact with them you can only capture them and change their urls/refresh, but interacting with them is pretty easy to do (I already did it for my train simulator) so I'll add that in a day or two. I modified ExampleUsage.cs to show how to use this as well.

To use Chromium Capture you will need to go unzip UnityWindowsCapture\UnityProject\Assets\SimpleWebBrowser\PluginServer\x86\libcef.zip into that x86\ folder, and unzip UnityWindowsCapture\UnityProject\Assets\SimpleWebBrowser\PluginServer\x64\libcef.zip into that x64\ folder, simply because those dlls were too big so github got angry unless I compressed them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.