Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Embedding UnityPlayer into a Forms application

Discussion in 'Editor & General Support' started by appels, Nov 29, 2021.

  1. appels


    Jun 25, 2010

    I can embed the UnityPlayer when I Start the player as a sepperate process using the CmdLine argument -parentHWND and the handle of my splitcontainer in my Windows Forms application.
    But then you have a sepperate process.
    I tried the other method by importing the Dll described here:
    and here:
    But then the game starts and the form is not showing anymore.
    Is it possible to embed into the same process and have the player show up on the form ?
    Any examples of that around ?
  2. Tautvydas-Zilys


    Unity Technologies

    Jul 25, 2013
    Call into UnityPlayer.dll from a new thread, as Unity will take over that thread.
    appels likes this.