Skip to content
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

release source and support Unity v6 #847

Merged
merged 47 commits into from
Nov 12, 2024
Merged

release source and support Unity v6 #847

merged 47 commits into from
Nov 12, 2024

Conversation

richardelms
Copy link
Contributor

@richardelms richardelms commented Nov 6, 2024

Goal

  • Change from releasing pre compiled DLLs for each platform to releasing source files with conditional compilation flags.
  • Update BugsnagUnityWebRequest to remove deprecation warnings and support new PostWwwForm methods introduced in Unity 2022.2

Design

Releasing pre compiled DLLs meant that our development cycle was slow as you would have to package the SDK after every change.

It also meant we could not take advantage of unity provided compiler flags to support multiple versions, #if UNITY_2022_2_OR_NEWER for example.

With this change to shipping source files, development time and build time is reduced to a fraction of what it was in the previous setup.

Another benefit is that we can simply open up the development project in new versions of Unity and solve issues that arise on the spot using the above mentioned flags.

In theory, using this approach means that we never have to drop support for a Unity version again, obviously this would not be good for E2E CI setup, but it's a comforting thought 😄

Other benefits to this PR include:

  • Removed legacy/unused tests and build script features.
  • Greatly simplified .UnityPackage and UPM Package build process.
  • Simplified Unit Test setup. In the previous setup we had an entire mock UnityEngine assembly that required maintenance. This is now completely removed because the unit tests run in the Unity Editor against the real UnityEngine assembly.
  • Simplified dev setup means that new developers can simply install Unity and get right to work on the C# layer.

Changeset

  • Simplified Rakefile as dotnet compilation is no longer required.
  • Converted all unit tests to Unity editor mode unit tests.
  • Created new development project Bugsnag to allow working on the src in Unity without having to repackage the entire SDK every time you make a change.
  • Simplified UPM build script as package import no longer required as part of the process.
  • Added a permanent fix for the unity bug where MacOS bundles do not get the required meta files generated.
  • Added a util script that ensures all plugin files have the correct import settings on creation.
  • Removed unnecessary Windows packaging test as there is no longer any platform specific build factors.

Testing

Unit tests passing and full CI run passing.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Nov 6, 2024

Build size impact

Format Size impact of Bugsnag (kB)
IL2CPP APK 2598.27
IL2CPP IPA 1696.2

Generated by 🚫 Danger

@richardelms richardelms changed the title Plat 13006 ship source release source and support Unity v6 Nov 7, 2024
@richardelms richardelms self-assigned this Nov 7, 2024
@richardelms richardelms marked this pull request as ready for review November 7, 2024 08:10
.buildkite/unity.2020.yml Show resolved Hide resolved
Bugsnag/Assets/Bugsnag/Runtime/Payload/Session.cs Outdated Show resolved Hide resolved
Bugsnag/Assets/TextMesh Pro.meta Outdated Show resolved Hide resolved
UPGRADING.md Show resolved Hide resolved
@richardelms richardelms merged commit 70d0b13 into next Nov 12, 2024
14 checks passed
@richardelms richardelms deleted the plat-13006-shipSource branch November 12, 2024 11:57
@richardelms richardelms mentioned this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants