Skip to content

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 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
@Pomdap
Copy link

Pomdap commented Oct 3, 2024

Really helpful, thank you!

@VMaldecoasago
Copy link
Author

Up @AdamSzApple

@AdamSzApple
Copy link
Contributor

Up @AdamSzApple

Thanks for raising this issue. I'm not allowed to make any forward-looking statements about fixes or future updates, but we're aware of the problem. Thank you. 😉

@AdamSzApple
Copy link
Contributor

Hopefully this issue is fixed by Apple.Core 3.1.7, merged on January 7. Thanks for bringing it to our attention. Please reopen this PR if issues remain.

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.

3 participants