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

feat: Support for programmatic option configuration #564

Merged
merged 8 commits into from
Feb 16, 2022

Conversation

bitsandfoxes
Copy link
Contributor

The idea is to allow users to programmatically interact with the Sentry options i.e. interact with BeforeSend.
We provide the users with a snippet that lets them create a scriptable object. The path Assets/Resources/Sentry/ is provided.

ConfigurableOptions

using Sentry.Unity;
using UnityEngine;

[CreateAssetMenu(fileName = "Assets/Resources/Sentry/OptionsConfiguration", menuName = "Sentry/OptionsConfiguration", order = 999)]
public class MyOptionsConfiguration : ScriptableOptionsConfiguration
{
    public override void Configure(SentryUnityOptions options)
    {
        // Your code here
    }
}

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2022

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against e359145

@bitsandfoxes bitsandfoxes changed the title feat: Hook for programmatic option configuration feat: Support for programmatic option configuration Feb 15, 2022
@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented Feb 15, 2022

opening the Options Configuration (o) window revealed this:
image
Should the user have some message inside of it instead of 'none' on what todo in order to have the options available?

@bitsandfoxes
Copy link
Contributor Author

opening the Options Configuration (o) window revealed this: image Should the user have some message inside of it instead of 'none' on what todo in order to have the options available?

Good catch! I'm working on a follow-up PR that aims to automate the creation of that scriptable object. The idea is to have a button that creates the snippet-script from a template, instantiates the actual scriptable object, and fills the field if it's empty.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

what about we use it in the sample?

@bitsandfoxes
Copy link
Contributor Author

what about we use it in the sample?

Good idea!

@bitsandfoxes bitsandfoxes merged commit de29836 into main Feb 16, 2022
@bitsandfoxes bitsandfoxes deleted the feat/programmatic-init branch February 16, 2022 09:39
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.

4 participants