Profile image

Program Window Display

109k hpgbproductions  2.8 years ago
1,751 downloads
Version 1.0 Part

READ BEFORE USE

Program Window Display is a mod that lets you display windows in the game. It contains two parts and two commands.

I wanted to make a mod that feeds data to external programs, and use them to draw UI and cockpit objects. However, I failed and didn't want to continue, so this is the half I managed to make. You can still use it to watch VTuber livestreams during long flights, I guess.

! WINDOWS ONLY !

This mod uses user32.dll and Unity built-in System.Drawing.dll. There is no platform check, and what happens on Mac is untested.

INFO

"My window is white!"

  • Check that the window is open. Open them before entering the level, or you will have to restart.
  • Check that the class name and window title are spelt correctly and are an exact match to the window information. If you can get away with leaving one empty (usually the window title), do it.
  • Check for IndexOutOfRangeException. Increase the size.

"My window is black!"

  • If possible, turn off hardware acceleration for the application.
  • If not possible, you cannot display that window.

Notice:

  • It CANNOT control other applications (e.g. clicking) from the game
  • It CANNOT perform remote internet access
  • It DOES NOT produce sound

Warnings:

  • The mod can cause sensitive information to be captured during screen recordings, or written to the log files.

Limitations:

  • Windows drawn directly to the hardware (e.g. pretty much every game) cannot be shown. (Read up by searching "printwindow black screen")
  • Turn off hardware accelerated graphics on windows you want to show, including Chromium-based browsers.

PARTS

The mod adds the parts "Program Window" and "Unlit Program Window", which use standard and unlit (always illuminated) shaders respectively.

  • Class Name, Window Title: Used to find the correct window. Must be a perfect match to the window data. Use the provided commands to find it. Further reading
  • Max Size: The size of the texture. It must be a power of two and should be larger than the window you want to capture. If you get IndexOutOfRangeException, increase the size.
  • Update Period: The rate of capture of window contents, in the number of frames.
  • Filter Mode: Choose the amount of smoothing applied to the texture.
  • Opacity: Global opacity to render a window with.
  • Transparency Options: When enabled, colors in the window that are close enough to the defined color will be transparent. A threshold of zero means that only exact matches are turned transparent.
  • Display Rect Options: When enabled, pixels outside of the defined coordinates will be transparent. It can be used to hide unwanted contents.

DEMO AIRCRAFT

Notice: Due to device differences, you may need to adjust the display rectangle.

pwdTest
Use with the following Processing PDE file. Try out the transparency and display rectangle options.
Class Name: SunAwtFrame
Window Title: PWDTEST

pwdTest_YouTube
The display rectangle lines up with the video in normal mode.
Class Name: Chrome_WidgetWin_1
Window Title: (null)

COMMANDS

ListWindows (void)
Writes information of all available windows. Click on each entry in the dev console to view the window title, class name, and pointer of the window.

ListWindowsWithName (string)
Writes information of all windows which have the entered string in the title. For example, ListWindowsWithName SimplePlanes will show all windows that contain "SimplePlanes" in the title.

REFERENCES

(i.e. some code copied from the following webpages)

  • Log in to leave a comment
  • Profile image
    135 Fralex

    Okay... let's dance!

    2 months ago
  • Profile image
    16.8k windshifter1

    @hpgbproductions Ok, thanks for letting me know. Though it is still a great mod with lots of potential! Amazing work

    7 months ago
  • Profile image

    @windshifter1 no, there aren't any i know
    The original goal of this mod is to link up with other programs like Processing to make custom displays. But cross program communication is very hard, so i never got anything out of this

    7 months ago
  • Profile image
    16.8k windshifter1

    @hpgbproductions Do you know of or have any aircraft using it as a demo? It would be really cool to try!

    7 months ago
  • Profile image

    @windshifter1 yes

    7 months ago
  • Profile image
    16.8k windshifter1

    @hpgbproductions Ah ok so you can display windows open on your windows, but not interact with them, yes? Kind of like a shared screen in meeting apps (like zoom)?

    7 months ago
  • Profile image

    @windshifter1 no, you can display any windows you want, but there is no way to interact with other windows

    7 months ago
  • Profile image
    16.8k windshifter1

    @hpgbproductions Wait a sec - you mean windows as in Microsoft Windows? Can this make like a computer in SimplePlanes?

    7 months ago
  • Profile image
    276 softalps

    @ShirakamiShimada real

    11 months ago
  • Profile image

    @CRAZYDENVER sometimes u gotta be a kid to be happy

    1.3 years ago
  • Profile image

    @TRD but for some reason you can't download these type of mods on android nor anyone making these mods anymore

    1.3 years ago
  • Profile image

    @CRAZYDENVER why would i [ __ ] on people who watch vtubers, im not a kid

    2.2 years ago
  • Profile image

    Why would I watch VTubers Im not a kid

    2.2 years ago
  • Profile image
    5,326 TRD6932

    @Deltafan123 No, but mods running on Android are definitely possible.
    Mods that don't need a script to run will work on mobile.
    It can include mostly maps, and some plugins and mods but that's about it.

    +1 2.3 years ago
  • Profile image

    @Deltafan123 no because you need unity to make mods

    2.3 years ago
  • Profile image

    Is it possible to make mods on android?

    +1 2.3 years ago
  • Profile image

    Oh wow imagine watching Netflix and get distracted while you watch a 2 hour movie and crash into the sea
    Or
    Playing a game while playing a game in a game

    2.4 years ago
  • Profile image

    @Bucket it should, try it

    2.4 years ago
  • Profile image
    5,873 Bucket

    Could i put this in my plane cockpit for VR and it would work?

    2.4 years ago
  • Profile image

    @hpgbproductions That's why there sister is is dead GRRRAAUUHH

    2.4 years ago
  • Profile image

    @JackRaiden my cringe inhibitors are off, that's why i chose it

    2.4 years ago
  • Profile image

    Jack Raiden on thumbnail looking dumb on website

    2.4 years ago
  • Profile image

    @UberAte it is a hardware-drawn window, so it's incompatible with this mod

    2.4 years ago
  • Profile image

    @hpgbproductions Im really trying to get this to work lol, I dunno man. I tried streaming my browser, typed in the exact window/class name found in the dev console, gave me a white screen. Tried streaming "SimplePlanes" (class name was UnityWndClass), gave me a black screen. Think you can make a quick screen recording, dont know what im doing wrong xd

    2.4 years ago
  • Profile image

    @UberAte
    1. Look at name of window at the top of the window
    2. Use dev console command to search for it (see COMMANDS section)
    3. Type the class name in the part. Must be exactly correct including upper/lowercase. Window title is optional, but if you happen to have multiple windows with the same class name, this will select the correct one.
    4. Set the window size larger than the window (just guess using your monitor resolution)
    5. Test it (see INFO section for FAQ)

    +1 2.4 years ago
  • Log in to see more comments