Skip to content

Preserve Android plugin CPU value in exports.json for ExportUnityPackage #639

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

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

lyjimmy
Copy link
Contributor

@lyjimmy lyjimmy commented Sep 1, 2023

Sets the CPU value in the importer metadata for Android plugins when the exports.json specifies a CPU value for the Android plugin.

Fixes #638

@@ -1799,6 +1848,9 @@ def importer_metadata(self):
platform_data_options["enabled"] = 1
importer_metadata = Asset.set_cpu_for_desktop_platforms(
importer_metadata)
if "Android" in platforms:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am debating with myself if you should only run set_cpu_for_android only if cpu_string is NOT AnyCPU.
What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! I added this change with a new commit. It seems like this will avoid extra work when cpu_string is AnyCPU since it would be looping through the platforms and make no changes (based on my understanding that the Android CPU value in importer_metadata appears to be always be AnyCPU without this change). Is this what you were thinking?

@chkuang-g chkuang-g merged commit a148338 into googlesamples:master Sep 14, 2023
@googlesamples googlesamples locked and limited conversation to collaborators Oct 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] Preserve Android plugin CPU value when using ExportUnityPackage
2 participants