Skip to content

Commit

Permalink
fix: keep previously set IL2CPP compiler arguments (i.e append instea…
Browse files Browse the repository at this point in the history
…d of overwriting) (#972)
  • Loading branch information
vaind authored Sep 14, 2022
1 parent eda26ae commit 6c75dea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

- Don't access Unity `AnalyticsSessionInfo.userId` on unknown platforms ([#971](https://github.com/getsentry/sentry-unity/pull/971))
- Keep previously set IL2CPP compiler arguments (i.e append instead of overwriting) ([#972](https://github.com/getsentry/sentry-unity/pull/972))

### Dependencies

Expand Down
4 changes: 2 additions & 2 deletions src/Sentry.Unity.Editor/Il2CppOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ internal class Il2CppOption : IPreprocessBuildWithReport
public void OnPreprocessBuild(BuildReport report)
{
var arguments = "--emit-source-mapping";
Debug.Log($"Setting additional IL2CPP arguments = '{arguments}' for platform {report.summary.platform}");
PlayerSettings.SetAdditionalIl2CppArgs(arguments);
Debug.Log($"Setting additional IL2CPP arguments '{arguments}' for platform {report.summary.platform}");
PlayerSettings.SetAdditionalIl2CppArgs(PlayerSettings.GetAdditionalIl2CppArgs() + $" {arguments}");
}
}
}

0 comments on commit 6c75dea

Please sign in to comment.