New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Native] Add generator for c# types used on c++ side #8193
base: develop
Are you sure you want to change the base?
Conversation
src/monogame/include/csharp_enums.h
Outdated
@@ -0,0 +1,2104 @@ | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is src
the top level folder decided for the native code?
What will be in this src
folder? Is it just the MonoGame native C++ dll?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/monogame
is the top level folder for the native code.
We should eventually move our src related stuff into one folder and not keeping it all mixed up in the top level, but that can come later once the native platform is fully working.
src/monogame/include/csharp_enums.h
Outdated
Intersects = 2, | ||
}; | ||
|
||
class ECSContainmentType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy way to get string value for the enum as C++ has no built in way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No i mean why is ECSContainmentType
here... that isn't planned to be exposed to native code.
But i see why... your generator just dumps all enums from MG framework to this header.
To avoid us having to keep track of C# enums on the C++ side, here is a small generator that exports them from the c# side.
In the future, if there is a need, we could also make it export C# structs.