Skip to content

Drop support for Unity 2019 #2231

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

Merged
merged 10 commits into from
Jul 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
type: string

env:
LOWEST_SUPPORTED_UNITY_VERSION: 2019
LOWEST_SUPPORTED_UNITY_VERSION: 2020
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the version used for packaging.

DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
GITHUB_ACTOR: ${{ github.actor }}
Expand Down
30 changes: 11 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch: # e.g. to manually trigger on foreign PRs

env:
LOWEST_SUPPORTED_UNITY_VERSION: 2019
LOWEST_SUPPORTED_UNITY_VERSION: 2020
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1

Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
# Building the SDK with Unity 2022 and newer requires ns2.1 - skipping for now
unity-version: ["2019", "2020", "2021"]
unity-version: ["2020", "2021"]
uses: ./.github/workflows/build.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not found a way to get these out of the matrix into the environment.

uses: ./.github/workflows/smoke-test-create.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand All @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
platform: ["WebGL", "Linux"]
include:
- platform: WebGL
Expand Down Expand Up @@ -140,14 +140,6 @@ jobs:
run: ./scripts/ci-docker.sh '${{ matrix.unity-version }}' '${{ matrix.platform }}${{ matrix.image-suffix }}' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
shell: bash

# Workaround for missing libMonoPosixHelper.so
# See https://github.com/getsentry/sentry-unity/pull/1295
- name: Install mono-devel
if: ${{ matrix.unity-version == '2019' }}
run: |
docker exec --user root unity apt-get update
docker exec --user root unity apt-get -y -q install mono-devel

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
Expand Down Expand Up @@ -213,7 +205,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
uses: ./.github/workflows/smoke-test-build-android.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand All @@ -232,7 +224,7 @@ jobs:
matrix:
api-level: [30, 31, 34] # last updated January 2025
init-type: ["runtime", "buildtime"]
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]

smoke-test-build-ios:
name: Build iOS ${{ matrix.unity-version }} Smoke Test
Expand All @@ -242,7 +234,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
uses: ./.github/workflows/smoke-test-build-ios.yml
with:
unity-version: ${{ matrix.unity-version }}
Expand All @@ -255,7 +247,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
init-type: ["runtime", "buildtime"]
uses: ./.github/workflows/smoke-test-compile-ios.yml
with:
Expand All @@ -274,7 +266,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
# Check https://support.apple.com/en-us/HT201222 for the latest minor version for a given major one.
# https://developer.apple.com/support/app-store/ shows that of all iOS devices
# - `iOS 17`: 86 %
Expand All @@ -295,7 +287,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
platform: ["WebGL", "Linux"]
steps:
- name: Checkout
Expand Down Expand Up @@ -333,7 +325,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-version: ["2019", "2022", "6000"]
unity-version: ["2020", "2022", "6000"]
# os: ["windows", "macos"]
os: ["windows"]
include:
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/smoke-test-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ jobs:
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'android' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
shell: bash

# Workaround for missing libMonoPosixHelper.so
# See https://github.com/getsentry/sentry-unity/pull/1295
- name: Install mono-devel
if: ${{ inputs.unity-version == '2019' }}
run: |
docker exec --user root unity apt-get update
docker exec --user root unity apt-get -y -q install mono-devel

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/smoke-test-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ jobs:
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'iOS' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
shell: bash

# Workaround for missing libMonoPosixHelper.so
# See https://github.com/getsentry/sentry-unity/pull/1295
- name: Install mono-devel
if: ${{ inputs.unity-version == '2019' }}
run: |
docker exec --user root unity apt-get update
docker exec --user root unity apt-get -y -q install mono-devel

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
unity-prefix: ['2019', '2020', '2021', '2022', '6000']
unity-prefix: ['2020', '2021', '2022', '6000']
steps:
- name: Find the latest Unity version
id: version-select
Expand All @@ -61,7 +61,7 @@ jobs:
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}

- name: Update sample ProjectVersion.txt
if: ${{ matrix.unity-prefix == '2019' }}
if: ${{ matrix.unity-prefix == '2020' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually irrelevant. Unity 2020 LTS reached its EOL in mid-2023. Specifically, the final patch version was 2020.3.48.

run: |
"m_EditorVersion: ${{ steps.version-select.outputs.version }}`nm_EditorVersionWithRevision: ${{ steps.version-select.outputs.version }} (${{ steps.version-select.outputs.changeset }})" `
| Out-File "samples\unity-of-bugs\ProjectSettings\ProjectVersion.txt"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- Dropped support for Unity 2019. It reached End of Life in 2022 ([#2231](https://github.com/getsentry/sentry-unity/pull/2231))

### Features

- The SDK now comes with a `SentryUserFeedback` prefab ready to be used. You can drag and drop it into your scene or
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Features>strict</Features>
<SignAssembly>false</SignAssembly>

<!-- This is the default for our lowest supported version 2019 LTS: netstandard2.0 -->
<!-- This is the default for our lowest supported version 2020 LTS: netstandard2.0 -->
<!-- The TargetFramework gets overridden depending on the UnityVersion here and in test/props -->
<TargetFramework>netstandard2.0</TargetFramework>
<!-- The RepoRoot gets used in the conditional propertygroup for finding the Unity version -->
Expand Down
11 changes: 10 additions & 1 deletion package-dev/Editor/SentryUserFeedbackEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 0 additions & 76 deletions package-dev/Runtime/SentryIntegrations.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#if UNITY_2020_3_OR_NEWER
#define SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
#endif

#if !UNITY_EDITOR
#if UNITY_WEBGL
#define SENTRY_WEBGL
Expand All @@ -27,21 +23,8 @@ public static void Configure(SentryUnityOptions options)
{
options.AddIntegration(new StartupTracingIntegration());
}
#endif
#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
if (options.AutoSceneLoadTraces)
{
options.AddIntegration(new SceneManagerTracingIntegration());
}
#endif
}
else
{
#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
options.DiagnosticLogger?.LogDebug("Skipping SceneManagerTracing integration because performance tracing is disabled.");
#endif
}

}
}

Expand Down Expand Up @@ -136,63 +119,4 @@ public static void AfterSceneLoad()
}
}
#endif

#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
public class SceneManagerTracingIntegration : ISdkIntegration
{
private static IDiagnosticLogger Logger;

public void Register(IHub hub, SentryOptions options)
{
Logger = options.DiagnosticLogger;

if (SceneManagerAPI.overrideAPI != null)
{
// TODO: Add a place to put a custom 'SceneManagerAPI' on the editor window so we can "decorate" it.
Logger?.LogWarning("Registering SceneManagerTracing integration - overwriting the previous SceneManagerAPI.overrideAPI.");
}

SceneManagerAPI.overrideAPI = new SceneManagerTracingAPI(Logger);
}
}

public class SceneManagerTracingAPI : SceneManagerAPI
{
public const string TransactionOperation = "scene.load";
private const string SpanOperation = "scene.load";
private readonly IDiagnosticLogger _logger;

public SceneManagerTracingAPI(IDiagnosticLogger logger)
{
_logger = logger;
}

protected override AsyncOperation LoadSceneAsyncByNameOrIndex(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame)
{
_logger?.LogInfo("Creating '{0}' transaction for '{1}'.", TransactionOperation, sceneName);

var transaction = SentrySdk.StartTransaction("scene.loading", TransactionOperation);
SentrySdk.ConfigureScope(scope => scope.Transaction = transaction);

_logger?.LogDebug("Creating '{0}' span.", SpanOperation);
var span = SentrySdk.GetSpan()?.StartChild(SpanOperation, sceneName ?? $"buildIndex:{sceneBuildIndex}");

var asyncOp = base.LoadSceneAsyncByNameOrIndex(sceneName, sceneBuildIndex, parameters, mustCompleteNextFrame);

// TODO: setExtra()? e.g. from the LoadSceneParameters:
// https://github.com/Unity-Technologies/UnityCsReference/blob/02d565cf3dd0f6b15069ba976064c75dc2705b08/Runtime/Export/SceneManager/SceneManager.cs#L30
// Note: asyncOp.completed triggers in the next frame after finishing (so the time isn't precise).
// https://docs.unity3d.com/2020.3/Documentation/ScriptReference/AsyncOperation-completed.html
asyncOp.completed += _ =>
{
_logger?.LogInfo("Finishing '{0}' transaction for '{1}'.", TransactionOperation, sceneName);

span?.Finish(SpanStatus.Ok);
transaction.Finish(SpanStatus.Ok);
};

return asyncOp;
}
}
#endif
}
65 changes: 0 additions & 65 deletions package-dev/Tests/Runtime/SentryIntegrationsTests.cs

This file was deleted.

Loading
Loading