Jump to content

WPF Samples


photo

Recommended Posts

hello

i found the sample in source\csharp\apps\main_wpf\D3D11SharpDXWPF,

it build and run successful.but just a logo image in the render window , the mouse can not move.

Because I'm a newer of unigine, i dont know how to load the world scene,and add my app logic in this wpf sample.

need some config?

thanks

Link to comment

you mean run this in cmd?

D:\Program Files\Unigine SDK Browser\sdks\evaluation_engineering_windows_2.11.0.2\bin>main_wpf_sharpdx.exe world_load ../data/samples/samples.world

 

Link to comment

i found the code in UnigineControl.cs as bellow , are you sure this can work?

private void InitializeEngine()
{
            // App
            app = new DX11UnigineApp(this);

            // Command Args
            string[] args = { };

            // Engine
            Engine.Init(app, args);
}

 

 

Link to comment

i have modify this code in UnigineControl.cs at line 66, then the scene load successful.but there seems to be something wrong with the mouse operation.

        private void InitializeEngine()
        {
            // App
            app = new DX11UnigineApp(this);

            // Command Args
            string[] args = { "-console_command", "world_load samples/samples/worlds/bone_00" };

            // Engine
            Engine.Init(app, args);
        }

 

20200604190057.png

Link to comment

i konw this issue is the system mouse cursor dont hide.

another issue is load world dont contain my c# script component,which i attched it to a scene node in unigine editor.

In fact, I really don't know how to use WPF with the scene editor. For example, how should my logical code be integrated into the WPF code.

Do i need to add my code in   InitializeEngine function( in UnigineControl.cs file at line 60)?

Link to comment

C# component system is designed for buil-in compiler. Your application compiles when you click "Play" button in the editor. If you're just loading world from the WPF sample you're loading a different binary that knows nothing of your components.

If you want WPF app I suggest moving to the IDE and writing code there.

Thanks.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...