Skip to content
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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

harry-cpp
Copy link
Member

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.

@@ -0,0 +1,2104 @@
//
Copy link
Member

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?

Copy link
Member Author

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.

Intersects = 2,
};

class ECSContainmentType
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

@harry-cpp harry-cpp marked this pull request as draft February 21, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants