Search Unity

Embedding unity into wpf

Discussion in 'General Discussion' started by ton33, Jun 16, 2020.

  1. ton33

    ton33

    Joined:
    Sep 3, 2018
    Posts:
    4
    Hello,
    So iam trying to use unity for only its 3d and 2d graphics in a wpf application for cad software,i've read around and found that the typical way this is done is to use winformshost and run your unity_program.exe.My next question is if i choose the winformshost method my WPF app dynamically changes 3d models and 2d drawings during runtime would i have code level api access i can call from the unity exe file?or would i be stuck with some sort intermediate system i have to design were for example a folder would contain all the 3d models,and i have another file describing 3d model positions that the unity exe looks at and the wpf would manage the files,and file contents.Iam not exactly sure how i can add and remove 3d models as well as positions,any input is appreciated thanks
     
  2. ChazBass

    ChazBass

    Joined:
    Jul 14, 2013
    Posts:
    153
    Could be done, but you are going to have to handle the inter-process communication between Unity and your WPF application. I could see a couple of ways to do that. For example, you could write a plug-in for Unity which uses sockets to communicate with your WPF application, which also communicates back using sockets. Before doing that, though, I would experiment with seeing what you could achieve by just using data files which are manipulated by both applications. Unity can write to data files, your WPF application could read them, and vice versa.
     
    ton33 likes this.