JavaHell
JavaHell

Reputation: 101

How get the Unity3D View In wpf winform

Hi, I'm working in Korean software office and developing android & Unity3D...

I'm want sample code for WPF winform in Viewing Unity3D Project.

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

For example: If click Button(In WPF), Create object unity3d in wpf viewer.

Please help me... I'm want perfect code. Not abstract...

Upvotes: 5

Views: 7892

Answers (1)

Ratih Nurmalasari
Ratih Nurmalasari

Reputation: 618

You can embed your Unity Standalone Application into your WPF application.

  1. Build your unity project into Unity standalone (PC).

  2. Insert WindowsFormsHost in your XAML as a container to load your Unity App.

    <WindowsFormsHost Name="windowsFormsHost" Height="700" Width="1000"/>
    
  3. Create Button in your XAML.

  4. Use ProcessStartInfo to show your Unity Application.

Upvotes: 8

Related Questions