Integrating NoesisGUI for Unigine C#


photo

Recommended Posts

Hello there,

i want to know if it would be possible to create a basic integration of Unigine with NoesisGUI but with the C# side.

i searched through the forum but all topics date back 3+ years ago and i want to know if its possible to do with a standard community license.

i tried to implement this: Application with Direct3D11 via SharpDX Library - Documentation - Unigine Developer but the files are nowhere to be found nor does it specify it is for the SIM or Engineering version.

for now i tried implementing the SharpDX example from Noesis: Tutorials/Samples/IntegrationSharpDX/C# at master · Noesis/Tutorials (github.com) 

but i get a problem with the Form:
image.thumb.png.37307c84bad087f9bd0f30dd1aeb0d8c.png

image.thumb.png.b939ca04e905ec892ce37ef83af670f4.png

here is the .cs file i made:

to run it you need to install the following nuget packages:
image.png.1bf79ac27365d0b88619a7c51759beaf.png

UserInterface.cs

if i remove everything from line 80 everything get read correctly:
image.png.f133278603cab58a3e9f5ad0ec03b9f6.png\

i guess what i am missing is how to render the noesisGUI into the game as a DX11 element.

like a ObjectGui

i am completely new to this so i may be confusing terms.

 

if anybody has the knowledge or time to help me please lead the way.

  • Like 2
Link to post

Kireita

If you have access to the Engineering / Sim SDKs you can check SharpDX implementation in <SDK>/source/csharp/apps/main_wpf. It's not available in Community edition, though due to missing Custom APP API and access to the rendering context. Looks like documentation is slightly outdated here, will be updated as soon as possible.

Regarding the System.Windows.Forms missing I think you have similar issue that described here:

Thanks!

  • Like 1

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

Link to post
4 hours ago, silent said:

Kireita

If you have access to the Engineering / Sim SDKs you can check SharpDX implementation in <SDK>/source/csharp/apps/main_wpf. It's not available in Community edition, though due to missing Custom APP API and access to the rendering context. Looks like documentation is slightly outdated here, will be updated as soon as possible.

Regarding the System.Windows.Forms missing I think you have similar issue that described here:

Thanks!

hey i have been able to include the necesary libraries and now it all works.

this is the nuget package that made it possible:
image.png.c57c7df00ed11327c5a13c449d41bb8d.png

and now i have been able to make this:

r222vXg.gif

basically the button just opens the external form now

ideally i want to render it in a ObjectGUi or just inside Unigine itself so it can be used as an actual interface or menu, do you guys think you can help me with this last step? 

here is the file:

UserInterface.cs

Edited by Kireita
Link to post

Hello @Kireita,

I think it's not possible what you want to achieve. The usual way to do that is to use the same device and swap chain to render into the same window. But it's only available in Engineering/Sim versions.

  • Like 1
Link to post
Just now, andrey-kozlov said:

Hello @Kireita,

I think it's not possible what you want to achieve. The usual way to do that is to use the same device and swap chain to render into the same window. But it's only available in Engineering/Sim versions.

Well... then i can officially give up on this then,  @andrey-kozlov thank you for the clear answer.
 

@silent can you confirm to me that this is the only way to do it i really thought i was getting somewhere here :(

if what i am doing is not possible the topic can be closed. I'm sorry for wasting your time 

Link to post

No worries!

Yeah, for NoeSIS GUI it's the only possible way to achieve (with a good performance).

Maybe we would find a way to expose the access to the rendering context in a different way in the future (so the integration of 3rd party GUI libraries will become easier).

  • Like 1

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

Link to post
3 minutes ago, silent said:

No worries!

Yeah, for NoeSIS GUI it's the only possible way to achieve (with a good performance).

Maybe we would find a way to expose the access to the rendering context in a different way in the future (so the integration of 3rd party GUI libraries will become easier).

understood, i wil continue with RmlUi then :D 
source: mikke89/RmlUi: RmlUi - The HTML/CSS User Interface library evolved (github.com)

you can close the topic.

  • Thanks 1
Link to post