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

Add ExportPlugin::get_platform_os_name; use in C# export plugin #90556

Closed

Conversation

raulsntos
Copy link
Member

  • Add ExportPlugin::get_platform_os_name method to retrieve the OS name for the current export's preset OS name from an export plugin without having to guess from the features.
  • Use the new ExportPlugin::get_platform_os_name in the C# export plugin to get the platform name.
    • On its own it's not enough, but this may be of interest to @shana as part of making the export plugin more extensible to make it work with unknown platforms (i.e. consoles). For now the list of supported platforms is still hardcoded.

Alternative design

We could alternatively expose a method in ExportPlugin to retrieve the EditorExportPlatform and then we can just use the EditorExportPlatform::get_os_name that is already exposed.

Allow to retrieve the current export platform's OS name from an `ExportPlugin` without having to guess from the features.
…platform

Get the platform OS name from the export preset instead of guessing from the export features.
Copy link
Contributor

@shana shana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this will work out well enough for the consoles needs right now, where we really need a way for export plugins to know what platform they're currently exporting for without having to guess. I can work with this 👍

@akien-mga
Copy link
Member

Alternative design

We could alternatively expose a method in ExportPlugin to retrieve the EditorExportPlatform and then we can just use the EditorExportPlatform::get_os_name that is already exposed.

Thinking about it, I think that could be useful. There's bound to be more platform-specific information we want to expose in the future so IMO it can make sense to start now with exposing EditorExportPlatform.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Apr 18, 2024
@raulsntos
Copy link
Member Author

raulsntos commented Apr 29, 2024

I'll make a PR for the C# changes in this PR after #90782 is merged.

@raulsntos raulsntos closed this Apr 29, 2024
@raulsntos raulsntos removed this from the 4.3 milestone Apr 29, 2024
@raulsntos raulsntos deleted the export/get_platform_os_name branch April 29, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants