How to get a Unity3D view in wpf winform

Hi, I work in the Korean software office and am developing Android and Unity3D ...

I need sample code for winform WPF in a Unity3D project.

http://forum.unity3d.com/threads/10855-Unity-in-a-Window/page3 , this is a link site. and reference materials.

For example: If you click a button (in WPF), create a unity3d object in the wpf viewer.

Please help me ... I want the perfect code. Not abstract ...

+4
source share
1 answer

You can embed a standalone Unity application in your WPF application.

  • Build your offline unity project (PC).

  • Paste WindowsFormsHost into your XAML as a container for loading the Unity application.

    <WindowsFormsHost Name="windowsFormsHost" Height="700" Width="1000"/> 
  • Create a button in your XAML.

  • Use ProcessStartInfo to display your Unity application.

+7
source

Source: https://habr.com/ru/post/1489221/


All Articles