-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat (Unity): Updated options #12636
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
Bundle ReportChanges will increase total bundle size by 1.34kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
|
||
![Options Configuration](./img/sentry-cli-option-configuration.png) | ||
|
||
The `Configure` callback gets invoked during the build process and allows you to modify the options used by Sentry CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth clarifying a bit what is going on here? LIke we have a CLI, and it has options. But we also inlude the CLI in the SDK, and the options for it are configurable via the editor (right?) but also via C# code (what you already said below):
The `Configure` callback gets invoked during the build process and allows you to modify the options used by Sentry CLI. | |
While the options below describe the arguments accepted by [Sentry CLI](https://docs.sentry.io/cli/), the Sentry SDK for Unity includes the CLI within it. And exposes a way to configure it through the editor itself, as well as through code. The `Configure` callback gets invoked during the build process and allows you to modify the options used by Sentry CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
docs/platforms/unity/configuration/options/programmatic-configuration/index.mdx
Outdated
Show resolved
Hide resolved
|
||
On mobile, the Unity SDK automatically modifies the generated Xcode and Gradle project to also contain the Cocoa and Java SDK respectively. These SDKs are capable of self-initializing before the Unity engine itself is started. This allows us to capture bugs/crashes of even the engine. | ||
|
||
The options to enable self-initialization are accessible via `AndroidNativeInitializationType` and `IosNativeInitializationType`. They default to `NativeInitializationType.Runtime`. When set to `Buildtime`, the native SDKs are configured and set up during `build time` and initialize themselves before the Unity engine. This means, that these options are baked into the outputted projects and cannot be changed at runtime via C# code. Changes to i.e. `Release` and `Environment` will not apply to events generated by the native SDKs. If you need to change these options at runtime, consider keepting the initialization type to `runtime`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They default to
NativeInitializationType.Runtime
.
This concept wasn't introduced yet. how about right above this paragraph, having a two bullet points one for each value of They default to NativeInitializationType
and describe what they do roughly. Then the paragraph is further explanation of the inner workkings?
|
||
## Migrating to 2.4.0 | ||
|
||
### Breaking Changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a breaking change on 2.4.0? I thought the old code worked fine, we just introduced some new way.
docs/platforms/unity/configuration/options/cli-options/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/unity/configuration/options/cli-options/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/unity/configuration/options/cli-options/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/unity/configuration/options/programmatic-configuration/index.mdx
Outdated
Show resolved
Hide resolved
|
||
On mobile, the Unity SDK automatically modifies the generated Xcode and Gradle project to also contain the Cocoa and Java SDK respectively. These SDKs are capable of self-initializing before the Unity engine itself is started. This allows us to capture bugs/crashes of even the engine. | ||
|
||
The options to enable self-initialization are accessible via `AndroidNativeInitializationType` and `IosNativeInitializationType`. They default to `NativeInitializationType.Runtime`. When set to `Buildtime`, the native SDKs are configured and set up during `build time` and initialize themselves before the Unity engine. This means, that these options are baked into the outputted projects and cannot be changed at runtime via C# code. Changes to i.e. `Release` and `Environment` will not apply to events generated by the native SDKs. If you need to change these options at runtime, consider keepting the initialization type to `runtime`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The options to enable self-initialization are accessible via `AndroidNativeInitializationType` and `IosNativeInitializationType`. They default to `NativeInitializationType.Runtime`. When set to `Buildtime`, the native SDKs are configured and set up during `build time` and initialize themselves before the Unity engine. This means, that these options are baked into the outputted projects and cannot be changed at runtime via C# code. Changes to i.e. `Release` and `Environment` will not apply to events generated by the native SDKs. If you need to change these options at runtime, consider keepting the initialization type to `runtime`. | |
The options to enable self-initialization are accessible via `AndroidNativeInitializationType` and `IosNativeInitializationType`. They default to `NativeInitializationType.Runtime`. When set to `Buildtime`, the native SDKs are configured and set up during `build time` and initialize themselves before the Unity engine. This means that these options are baked into the outputted projects and cannot be changed at runtime via C# code. Changes to `Release` and `Environment` will not apply to events generated by the native SDKs. If you need to change these options at runtime, consider keepting the initialization type to `runtime`. |
|
||
### Breaking Changes | ||
|
||
The Runtime- and BuildTime-Configuration have been merged into a single OptionsConfiguration script. This allows for programmatic configuration of the SDK in one place using precompile directives instead of having to duplicate setting options in two different files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Runtime- and BuildTime-Configuration have been merged into a single OptionsConfiguration script. This allows for programmatic configuration of the SDK in one place using precompile directives instead of having to duplicate setting options in two different files. | |
The Runtime- and BuildTime-Configuration have been merged into a single OptionsConfiguration script. This allows for programmatic configuration of the SDK in one place using precompiled directives instead of having to duplicate setting options in two different files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for updating.
Co-authored-by: Alex Krawiec <[email protected]> Co-authored-by: Bruno Garcia <[email protected]>
This addresses the bigger changes introduced with
3.0.0
and cleans up the documentation around Unity SDK's options and their programmatic configuration.Runtime
andBuildTime
Configurationruntime initialization
for native SDKs now on all platforms3.0.0
(and the missing2.4.0
)Also fixes getsentry/sentry-unity#1795