-
Notifications
You must be signed in to change notification settings - Fork 206
Fix OnApplicationStart DllNotFoundException in Unity Editor for Windows #42
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
base: main
Are you sure you want to change the base?
Conversation
* Microsoft's Unity linter asked me to fix this. * Reorganizing some calls and order of operations for two reasons: - Compatibility with Unity's batchmode - Avoid interactions with the Asset Database while it's in an undefined state - defer to `OnPostprocessAllAssets` * Unity project version bump. * I feel like this is pretty close to what it needs to be. I'll test it out tomorrow - but currently it works in just the local Apple.Core Unity project. I'll go through various builds in both Editor and Batch mode builds to check. * Addressing review feedback and cleaning up some comment formatting here and there. * No gelpers allowed. * Version bump. * Tested with the following and works: - Built all plug-ins - Created new project and imported Apple.Core and the GameKit plug-ins - Built in the Editor for iPad, generated Xcode project works as expected - Built on command line with batch mode, generated Xcode project works as expected. --------- Co-authored-by: Adam Szofran <aszofran@apple.com>
|
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. |
|
This issue still persists in Apple.Core 3.1.7 and Apple.GameKit 3.0.1 |
|
Reopened. Thanks for letting us know. |
|
I thought I would mention that this also occurs in the GameKit package as well. The DefaultHandlers.cs file has two classes, DefaultNSExceptionHandler and DefaultNSErrorHandler. They each have an Init() function that cause DllNotFoundExceptions on the Windows editor upon entering play mode. This is with Core 3.1.8 and GameKit 3.0.2. |
|
I think the issue still exits, this is the log from Windows Unity Editor: |
Issue
When starting the Unity Editor on Windows while using AppleUnityPlugins, we get the following error:
Expected behaviour
We should not get any Error in the Editor.
Fix
Add ifdef around the Dll imported methods.