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

Support batchmode with "quit" flag on #29

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

VMaldecoasago
Copy link

@VMaldecoasago VMaldecoasago commented Jul 4, 2024

Changes

Currently, compiling a game with Apple.Core while in batch mode results in native libraries not being found. That occurs due to the following issues:

1. Creating assets during InitializeOnLoad

According to this Unity issue, assets cannot be created on InitializeOnLoad, because the asset importing is not yet completed at that stage. This was causing a UnityException when building my game due to Apple.Core not being able to load the Default Profile asset, even though it is present in the repository. All the assets creation and retrival were moved to OnPostprocessAllAssets, which, according to the above mentioned Unity issue, is also called after domain reload, but only after all assets have been imported.

2. Using asynchronous coroutines while using -quit argument

ApplePlugInEnvironment relies on EditorUpdate to wait for the PackageManager to complete, which will not work on -batchmode -quit. In this case, we have to call EditorUpdate manually

@VMaldecoasago VMaldecoasago changed the title Fix creating assets during asset import Support batchmode Jul 5, 2024
@VMaldecoasago VMaldecoasago force-pushed the fix/load-default-profile-after-importing-assets branch from 53f2403 to 06244e1 Compare July 8, 2024 21:36
VMaldecoasago added a commit to SagoSago/apple-unityplugins that referenced this pull request Jul 8, 2024
@VMaldecoasago VMaldecoasago changed the title Support batchmode Support batchmode with "quit" flag on Jul 9, 2024
DodgyTim pushed a commit to dodgy-ltd/apple-unityplugins that referenced this pull request Jul 14, 2024
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.

1 participant