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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Use Unity Windows app in the ActiveX container in a Windows Forms app?

Discussion in 'Editor & General Support' started by sharpener, Jan 16, 2015.

  1. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    The animation department in my company has created a Unity Windows app. Currently the app exists in plain EXE format and runs fine on my Windows 8.1 box. I want to be able to run it from a Windows Forms app and embed it in the Unity ActiveX container on a form. However, being new to Unity, I don't know what to ask the animation department to get this going. I'm a long-time Windows programmer so I know ActiveX fairly well. But what I need to know is:

    - Do I need to get the Unity App in a different form than the EXE format it currently is in order to embed it in the Unity ActiveX control? If so, what form is it? A DLL or something? In other words, what is the correct language/terminology to use with the animation department to get something I can embed in the Unity ActiveX container?

    - Once I do have the correct payload, are there any steps I need to take to register the Unity Active X container as a registered system ActiveX interface? Same question for the payload itself, the content currently in EXE format, if the payload does indeed turn out to be a DLL?

    - Once I have something I can embed in my Windows Forms app, what steps will I need to take in the installer I create to repeat that (alleged) ActiveX configuration/registration on a new user's system?

    As you can see I'm not sure how to structure the conversation with the animation department. I've asked them and they told me they've never done anything with ActiveX and don't know what to tell me. Note, I do have access to the Unity project source and the associated Visual Studio project generated for it.
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    The Unity web player plugin is actually wrapped in an ActiveX control. So potentially your animation guys can create a web player version of the game, and you can host it in your windows app. This hasn't had a huge amount of attention, so I wouldn't say it's the recommended approach. Just something you can spend a day exploring.
     
  3. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    Thanks Graham.
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,272
  5. sharpener

    sharpener

    Joined:
    Jan 6, 2015
    Posts:
    8
    Thanks r618, that looks interesting. Does anyone know if I resize the parent window containing the Unity window, if the Unity window will resize itself automatically to fill the parent?