Using a windows form in Unity

Hi guys,

In my project, I am trying to have a windows form with a button. and everytime the user clicks the button, a gameobject must do a transform.Rotate or any transform for that instance.

I am able to get the windows form displaying in unity but only when I close the form does the control go back to gameobject. I am unable to to run the form and have control of the object concurrently. I would like to know if it is actually possible to do such a thing.

Also, I have this USB application, which I like to run in unity. This USB application communicates to my program via a form. I would like to know if it is possible to have such an USB application communicate to a Game Object in unity?

Thanks in advance!

Any help would be much appreciated.

-Deepak.

I know this is kinda old but i just now saw it cause im just now using this site but anyways you can get a form up in unity using GTK in mono, just import the .dlls that you need into your project then create a form using the GTK, you can even use the visual editor in MonoDev. but combine the two .cs files that it makes for your window into one file then all you have to do is anywhere you want to start the form add this

    Gtk.Application.Init();
    MainWindow chatWindow = new MainWindow();
    chatWindow.Show();
    Gtk.Application.Run();

and then so it will close with the game add this into the function OnApplicationQuit()

    Gtk.Application.Quit();

WindowsForms don't work in Unity. Instead we provide a very tightly integrated way for you to extend the unity editor. See Editor Windows in the documentation. For runtime, you can use the same api to get your runtime GUI up and running, GUILayout.* and friends.

This still working on Unity 4.5? I’m trying without success. Someone can help me? Thanks!