Skip to content

Commit

Permalink
fix: PerformanceAutoInstrumentation shouldn't load scripts unless bui…
Browse files Browse the repository at this point in the history
…lding
  • Loading branch information
vaind committed Nov 7, 2022
1 parent 10b4c6a commit 4468d5a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ public static class PerformanceAutoInstrumentation
static PerformanceAutoInstrumentation()
{
var sentryUnityAssemblyPath = Path.GetFullPath(Path.Combine("Packages", SentryPackageInfo.GetName(), "Runtime", "Sentry.Unity.dll"));
var (options, cliOptions) = SentryScriptableObject.ConfiguredBuildtimeOptions();

CompilationPipeline.assemblyCompilationFinished += (assemblyPath, _) =>
{
if (!BuildPipeline.isBuildingPlayer || options == null)
if (!BuildPipeline.isBuildingPlayer)
{
return;
}
var (options, cliOptions) = SentryScriptableObject.ConfiguredBuildtimeOptions();
if (options == null)
{
return;
}
Expand Down

0 comments on commit 4468d5a

Please sign in to comment.