Search Unity

How to create a Steam-like launcher/shell

Discussion in 'Windows' started by MR_asilva, May 18, 2017.

  1. MR_asilva

    MR_asilva

    Joined:
    Oct 23, 2015
    Posts:
    13
    I am looking to create a Unity app that can launch other Unity apps. It sounds like an easy thing to do, but there a few requirements that are making it quite difficult:

    1. The launched apps should essentially run "inside" the launcher (there will only ever be one child app running at a time).
    2. Both launcher and launchee should continue to run.
    3. The launcher should essentially be a transparent window and the child app should run behind it, as a full resolution, windowed, no-border app.
    4. The launcher may occasionally display some UI elements on top of the running child app (a la Steam achievements/notifications/etc).
    5. Windows standalone only, there are no other platforms required.
    6. Both apps will always run at standardized resolution (currently 1080p).

    I have tried the following techniques with varying degrees of success, but nothing that could get to 100% success:

    A Unity app that allows you to see through to the desktop and render things on top of it
    https://forum.unity3d.com/threads/s...ue-contents-lwa_colorkey.323057/#post-3072642
    This one was the closest to working, but ultimately failed because it's a key color algorithm and when elements rendered into the transparent window had any non-opaque pixels (whether in the texture or via vertex alpha), you can see the key color blended in with those elements. I did try using a 2 camera setup and have the first camera essentially create a completely transparent window using the key color post fx setup in that post and the ImageEffectOpaque attribute and then render the "hovering" UI elements with a second camera set to clear nothing, but that ended up somehow filling all the pixels that were supposed to be transparent with black by the time it rendered to the screen.

    Using the -parentHWND flag with the launched app
    https://forum.unity3d.com/threads/d...application-inside-scene.447171/#post-3064137
    Results in some very strange artifacts which are shown in my most recent post in the thread. Basically, it seems like the parent Unity app does not have a defined behavior about what it is supposed to do when it becomes another app's parent.

    Any ideas on other things to try within those solutions or another solution completely would be greatly appreciated. At this point, it feels like I may end up having to build my launcher in WPF (and launch my games with the -parentHWND flag from there), but I'd like to avoid that since I don't have a lot of experience with it and I already have a working launcher app/UI built in Unity.

    Thanks in advance.
     
    Last edited: May 18, 2017
  2. Hable2

    Hable2

    Joined:
    Jun 6, 2018
    Posts:
    1
    Hello! I'm fighting with the same problem. Is there any updates?
    Thanks in advance