ly.wu Posted June 4, 2020 Posted June 4, 2020 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
morbid Posted June 4, 2020 Posted June 4, 2020 Hello @ly.wu, Not sure I got the problem right. What's happening after you run the WPF sample? You should see the engine viewport built in WPF application: How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
morbid Posted June 4, 2020 Posted June 4, 2020 Well, you need to load a scene. You can load any sample from the console, for instance "world_load animation_00" How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
ly.wu Posted June 4, 2020 Author Posted June 4, 2020 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
ly.wu Posted June 4, 2020 Author Posted June 4, 2020 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); }
ly.wu Posted June 4, 2020 Author Posted June 4, 2020 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); }
morbid Posted June 4, 2020 Posted June 4, 2020 2 hours ago, ly.wu said: but there seems to be something wrong with the mouse operation. Can you be more specific? What's wrong with the mouse? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
ly.wu Posted June 5, 2020 Author Posted June 5, 2020 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)?
morbid Posted June 6, 2020 Posted June 6, 2020 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts