firebase-unity-sdk
firebase-unity-sdk copied to clipboard
Copy GA DLL for Windows Build and Play Mode if it exists
This change adds analytics_win.dll (if present) to the Windows build directory / Play Mode when the Firebase Analytics module is used.
The following modifications were made:
- Modified
editor/app/src/DllLocationPatcher.cs:- Added logic to
OnPostProcessBuildto copyanalytics_win.dllfrom the project root to the build's plugin directory (<project_name>_Data/Plugins/) when building for StandaloneWindows or StandaloneWindows64, but only if the Firebase Analytics module is detected and the DLL exists.
- Added logic to
- Created
editor/app/src/AnalyticsPlayModeSetup.cs:- This new editor script subscribes to
EditorApplication.playModeStateChanged. - When entering Play Mode on a Windows editor, it checks for the Firebase Analytics module and the existence of
analytics_win.dllin the project root. - If both conditions are met, it copies
analytics_win.dlltoAssets/Plugins/to make it available during Play Mode.
- This new editor script subscribes to
These changes ensure that analytics_win.dll is correctly placed for both Windows builds and Play Mode sessions, facilitating proper Firebase Analytics functionality on the Windows platform.
Description
Provide details of the change, and generalize the change in the PR title above.
Testing
Describe how you've tested these changes.
Type of Change
Place an x the applicable box:
- [ ] Bug fix. Add the issue # below if applicable.
- [ ] New feature. A non-breaking change which adds functionality.
- [ ] Other, such as a build process or documentation change.