Jump to content

Question regarding exporting an asset in C++ to C#


photo

Recommended Posts

I'm experimenting with the engine and would like to be able to use the Hight Level Vehicle asset in a C# project, but it doesn't appear when I drag the folder into the project. I thought I read that we had the possibility of using C++ classes in a C# project. Is it possible to transfer the High level Vehicle asset into a C# project or do you have to program it from scratch in C#?

Link to comment

Hello!

High-Level vehicle sample is written with C++, so you can't simply copy it's files into C#-based project. Indeed, you can call C++ code from C#, but it's not a trivial process and you need to do modifications to the initial C++ codebase, which may be a quite hard task (and there is no guarantees that it will work for this project specifically).

Since you have access to the С++ source code you can try to port it to C#.

Thanks!

 

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

Link to comment

When we download the High Level vehicle asset, the scripts are only in .prop and when I open them with an IDE, they are xml. Is it possible to have access to the C++ code in the asset?

 

So, if I understand correctly, the asset high level vehicle is simply available in C++ projects? So what's the point of selling the machine as supporting both languages if most of the important assets are only in C++ and can only be used in C++ projects?

Link to comment
Quote

When we download the High Level vehicle asset, the scripts are only in .prop and when I open them with an IDE, they are xml. Is it possible to have access to the C++ code in the asset?

Editor is not showing assets outside of the data directory. The source code is available in <DEMO>/source directory. When you do Copy as project sources are also being copied into the <Project>/source directory. In order to build and run this project you need to have installed Visual Studio 2015 with C++ build tools and after that you can safely open <Project>/source/<project>.vcxproj and build.

 

Quote

So, if I understand correctly, the asset high level vehicle is simply available in C++ projects? 

Yes, at the moment High-level Vehicle sample is available for C++ only, but we are considering to port it or provide an API to make it compatible with C# out of the box. So far we didn't find a proper way of doing this, so we are still in research phase.

 

Quote

So what's the point of selling the machine as supporting both languages if most of the important assets are only in C++ and can only be used in C++ projects?

Currently, the majority of our simulation industry customers are developing their products using C++. As a result, all of the simulation samples provided are naturally based on C++. However, the situation is changing rapidly, and we hope to eventually provide more C# API samples to our customers as well.

Thanks!

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

Link to comment
×
×
  • Create New...