Skip to content

Commit a77421f

Browse files
authored
Drop support for Unity 2019 (#2231)
1 parent 5c1f1a3 commit a77421f

24 files changed

+445
-273
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
type: string
88

99
env:
10-
LOWEST_SUPPORTED_UNITY_VERSION: 2019
10+
LOWEST_SUPPORTED_UNITY_VERSION: 2020
1111
DOTNET_CLI_TELEMETRY_OPTOUT: 1
1212
DOTNET_NOLOGO: 1
1313
GITHUB_ACTOR: ${{ github.actor }}

.github/workflows/ci.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
workflow_dispatch: # e.g. to manually trigger on foreign PRs
1212

1313
env:
14-
LOWEST_SUPPORTED_UNITY_VERSION: 2019
14+
LOWEST_SUPPORTED_UNITY_VERSION: 2020
1515
DOTNET_CLI_TELEMETRY_OPTOUT: 1
1616
DOTNET_NOLOGO: 1
1717

@@ -54,7 +54,7 @@ jobs:
5454
fail-fast: false
5555
matrix:
5656
# Building the SDK with Unity 2022 and newer requires ns2.1 - skipping for now
57-
unity-version: ["2019", "2020", "2021"]
57+
unity-version: ["2020", "2021"]
5858
uses: ./.github/workflows/build.yml
5959
with:
6060
unity-version: ${{ matrix.unity-version }}
@@ -87,7 +87,7 @@ jobs:
8787
strategy:
8888
fail-fast: false
8989
matrix:
90-
unity-version: ["2019", "2022", "6000"]
90+
unity-version: ["2020", "2022", "6000"]
9191
uses: ./.github/workflows/smoke-test-create.yml
9292
with:
9393
unity-version: ${{ matrix.unity-version }}
@@ -101,7 +101,7 @@ jobs:
101101
strategy:
102102
fail-fast: false
103103
matrix:
104-
unity-version: ["2019", "2022", "6000"]
104+
unity-version: ["2020", "2022", "6000"]
105105
platform: ["WebGL", "Linux"]
106106
include:
107107
- platform: WebGL
@@ -140,14 +140,6 @@ jobs:
140140
run: ./scripts/ci-docker.sh '${{ matrix.unity-version }}' '${{ matrix.platform }}${{ matrix.image-suffix }}' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
141141
shell: bash
142142

143-
# Workaround for missing libMonoPosixHelper.so
144-
# See https://github.com/getsentry/sentry-unity/pull/1295
145-
- name: Install mono-devel
146-
if: ${{ matrix.unity-version == '2019' }}
147-
run: |
148-
docker exec --user root unity apt-get update
149-
docker exec --user root unity apt-get -y -q install mono-devel
150-
151143
- name: Download IntegrationTest project
152144
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
153145
with:
@@ -213,7 +205,7 @@ jobs:
213205
strategy:
214206
fail-fast: false
215207
matrix:
216-
unity-version: ["2019", "2022", "6000"]
208+
unity-version: ["2020", "2022", "6000"]
217209
uses: ./.github/workflows/smoke-test-build-android.yml
218210
with:
219211
unity-version: ${{ matrix.unity-version }}
@@ -232,7 +224,7 @@ jobs:
232224
matrix:
233225
api-level: [30, 31, 34] # last updated January 2025
234226
init-type: ["runtime", "buildtime"]
235-
unity-version: ["2019", "2022", "6000"]
227+
unity-version: ["2020", "2022", "6000"]
236228

237229
smoke-test-build-ios:
238230
name: Build iOS ${{ matrix.unity-version }} Smoke Test
@@ -242,7 +234,7 @@ jobs:
242234
strategy:
243235
fail-fast: false
244236
matrix:
245-
unity-version: ["2019", "2022", "6000"]
237+
unity-version: ["2020", "2022", "6000"]
246238
uses: ./.github/workflows/smoke-test-build-ios.yml
247239
with:
248240
unity-version: ${{ matrix.unity-version }}
@@ -255,7 +247,7 @@ jobs:
255247
strategy:
256248
fail-fast: false
257249
matrix:
258-
unity-version: ["2019", "2022", "6000"]
250+
unity-version: ["2020", "2022", "6000"]
259251
init-type: ["runtime", "buildtime"]
260252
uses: ./.github/workflows/smoke-test-compile-ios.yml
261253
with:
@@ -274,7 +266,7 @@ jobs:
274266
strategy:
275267
fail-fast: false
276268
matrix:
277-
unity-version: ["2019", "2022", "6000"]
269+
unity-version: ["2020", "2022", "6000"]
278270
# Check https://support.apple.com/en-us/HT201222 for the latest minor version for a given major one.
279271
# https://developer.apple.com/support/app-store/ shows that of all iOS devices
280272
# - `iOS 17`: 86 %
@@ -295,7 +287,7 @@ jobs:
295287
strategy:
296288
fail-fast: false
297289
matrix:
298-
unity-version: ["2019", "2022", "6000"]
290+
unity-version: ["2020", "2022", "6000"]
299291
platform: ["WebGL", "Linux"]
300292
steps:
301293
- name: Checkout
@@ -333,7 +325,7 @@ jobs:
333325
strategy:
334326
fail-fast: false
335327
matrix:
336-
unity-version: ["2019", "2022", "6000"]
328+
unity-version: ["2020", "2022", "6000"]
337329
# os: ["windows", "macos"]
338330
os: ["windows"]
339331
include:

.github/workflows/smoke-test-build-android.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ jobs:
3737
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'android' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
3838
shell: bash
3939

40-
# Workaround for missing libMonoPosixHelper.so
41-
# See https://github.com/getsentry/sentry-unity/pull/1295
42-
- name: Install mono-devel
43-
if: ${{ inputs.unity-version == '2019' }}
44-
run: |
45-
docker exec --user root unity apt-get update
46-
docker exec --user root unity apt-get -y -q install mono-devel
47-
4840
- name: Download IntegrationTest project
4941
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5042
with:

.github/workflows/smoke-test-build-ios.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ jobs:
4343
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'iOS' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
4444
shell: bash
4545

46-
# Workaround for missing libMonoPosixHelper.so
47-
# See https://github.com/getsentry/sentry-unity/pull/1295
48-
- name: Install mono-devel
49-
if: ${{ inputs.unity-version == '2019' }}
50-
run: |
51-
docker exec --user root unity apt-get update
52-
docker exec --user root unity apt-get -y -q install mono-devel
53-
5446
- name: Download IntegrationTest project
5547
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
5648
with:

.github/workflows/update-deps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
unity-prefix: ['2019', '2020', '2021', '2022', '6000']
47+
unity-prefix: ['2020', '2021', '2022', '6000']
4848
steps:
4949
- name: Find the latest Unity version
5050
id: version-select
@@ -61,7 +61,7 @@ jobs:
6161
ssh-key: ${{ secrets.CI_DEPLOY_KEY }}
6262

6363
- name: Update sample ProjectVersion.txt
64-
if: ${{ matrix.unity-prefix == '2019' }}
64+
if: ${{ matrix.unity-prefix == '2020' }}
6565
run: |
6666
"m_EditorVersion: ${{ steps.version-select.outputs.version }}`nm_EditorVersionWithRevision: ${{ steps.version-select.outputs.version }} (${{ steps.version-select.outputs.changeset }})" `
6767
| Out-File "samples\unity-of-bugs\ProjectSettings\ProjectVersion.txt"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Breaking Changes
6+
7+
- Dropped support for Unity 2019. It reached End of Life in 2022 ([#2231](https://github.com/getsentry/sentry-unity/pull/2231))
8+
59
### Features
610

711
- The SDK now comes with a `SentryUserFeedback` prefab ready to be used. You can drag and drop it into your scene or

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Features>strict</Features>
1111
<SignAssembly>false</SignAssembly>
1212

13-
<!-- This is the default for our lowest supported version 2019 LTS: netstandard2.0 -->
13+
<!-- This is the default for our lowest supported version 2020 LTS: netstandard2.0 -->
1414
<!-- The TargetFramework gets overridden depending on the UnityVersion here and in test/props -->
1515
<TargetFramework>netstandard2.0</TargetFramework>
1616
<!-- The RepoRoot gets used in the conditional propertygroup for finding the Unity version -->

package-dev/Editor/SentryUserFeedbackEditor.cs.meta

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-dev/Runtime/SentryIntegrations.cs

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#if UNITY_2020_3_OR_NEWER
2-
#define SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
3-
#endif
4-
51
#if !UNITY_EDITOR
62
#if UNITY_WEBGL
73
#define SENTRY_WEBGL
@@ -27,21 +23,8 @@ public static void Configure(SentryUnityOptions options)
2723
{
2824
options.AddIntegration(new StartupTracingIntegration());
2925
}
30-
#endif
31-
#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
32-
if (options.AutoSceneLoadTraces)
33-
{
34-
options.AddIntegration(new SceneManagerTracingIntegration());
35-
}
3626
#endif
3727
}
38-
else
39-
{
40-
#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
41-
options.DiagnosticLogger?.LogDebug("Skipping SceneManagerTracing integration because performance tracing is disabled.");
42-
#endif
43-
}
44-
4528
}
4629
}
4730

@@ -136,63 +119,4 @@ public static void AfterSceneLoad()
136119
}
137120
}
138121
#endif
139-
140-
#if SENTRY_SCENE_MANAGER_TRACING_INTEGRATION
141-
public class SceneManagerTracingIntegration : ISdkIntegration
142-
{
143-
private static IDiagnosticLogger Logger;
144-
145-
public void Register(IHub hub, SentryOptions options)
146-
{
147-
Logger = options.DiagnosticLogger;
148-
149-
if (SceneManagerAPI.overrideAPI != null)
150-
{
151-
// TODO: Add a place to put a custom 'SceneManagerAPI' on the editor window so we can "decorate" it.
152-
Logger?.LogWarning("Registering SceneManagerTracing integration - overwriting the previous SceneManagerAPI.overrideAPI.");
153-
}
154-
155-
SceneManagerAPI.overrideAPI = new SceneManagerTracingAPI(Logger);
156-
}
157-
}
158-
159-
public class SceneManagerTracingAPI : SceneManagerAPI
160-
{
161-
public const string TransactionOperation = "scene.load";
162-
private const string SpanOperation = "scene.load";
163-
private readonly IDiagnosticLogger _logger;
164-
165-
public SceneManagerTracingAPI(IDiagnosticLogger logger)
166-
{
167-
_logger = logger;
168-
}
169-
170-
protected override AsyncOperation LoadSceneAsyncByNameOrIndex(string sceneName, int sceneBuildIndex, LoadSceneParameters parameters, bool mustCompleteNextFrame)
171-
{
172-
_logger?.LogInfo("Creating '{0}' transaction for '{1}'.", TransactionOperation, sceneName);
173-
174-
var transaction = SentrySdk.StartTransaction("scene.loading", TransactionOperation);
175-
SentrySdk.ConfigureScope(scope => scope.Transaction = transaction);
176-
177-
_logger?.LogDebug("Creating '{0}' span.", SpanOperation);
178-
var span = SentrySdk.GetSpan()?.StartChild(SpanOperation, sceneName ?? $"buildIndex:{sceneBuildIndex}");
179-
180-
var asyncOp = base.LoadSceneAsyncByNameOrIndex(sceneName, sceneBuildIndex, parameters, mustCompleteNextFrame);
181-
182-
// TODO: setExtra()? e.g. from the LoadSceneParameters:
183-
// https://github.com/Unity-Technologies/UnityCsReference/blob/02d565cf3dd0f6b15069ba976064c75dc2705b08/Runtime/Export/SceneManager/SceneManager.cs#L30
184-
// Note: asyncOp.completed triggers in the next frame after finishing (so the time isn't precise).
185-
// https://docs.unity3d.com/2020.3/Documentation/ScriptReference/AsyncOperation-completed.html
186-
asyncOp.completed += _ =>
187-
{
188-
_logger?.LogInfo("Finishing '{0}' transaction for '{1}'.", TransactionOperation, sceneName);
189-
190-
span?.Finish(SpanStatus.Ok);
191-
transaction.Finish(SpanStatus.Ok);
192-
};
193-
194-
return asyncOp;
195-
}
196-
}
197-
#endif
198122
}

package-dev/Tests/Runtime/SentryIntegrationsTests.cs

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)