-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Set functions to modify ScriptableSentryUnityOptions from internal to public #419
Set functions to modify ScriptableSentryUnityOptions from internal to public #419
Conversation
Hey, thanks for opening this up. If I catch your intention: You want to programmatically modify the scriptable options object instead of using the programmatic initialization approach? Are there any features in particular you are missing? |
Yes, the point being that this happens during player build-time, not during runtime! To rephrase it bit differently: The CI I'm currently working with calls an editor-only C# function, which does a bunch of stuff before building the player via BuildPipeline.BuildPlayer. A bunch of stuff in this case is things like injecting commit id/branch and including/excluding certain scenes. This works by changing the scriptable object(s) referenced in the project and then saving the asset again before building the player, so it gets included into the build. |
While we do see your point and the use-case we're reluctant to just merge this. |
I've looked at the code and the hooks you mentioned remain unaffected by this change, as what I want to achieve is happening before these get executed. So basically it is: Platform-sensitive settings would allow some more flexibility compared to the current system, but I would also personally advise against going too far in this direction (regarding allowing of configurating everything per platform via the UI), as the simplicity is one of my favorite aspects of this great SDK/product! |
Sounds like there's no other reason to keep them private? Surely they can be modified outside of our code which includes validations etc, but at that point "You must know what you're doing". |
We wanted to collect requirements for changes y'all do in such way to perhaps offer first class features to allow those. By making it public it makes it less likely for users to reach out with such requirements. But we can live with that |
Hi @RiederAlex! Would it be possible for you to rebase this fork onto main? Or pull main into it so we can let CI pass and then merge it? |
fdc80af
to
91604fe
Compare
Hey @RiederAlex, I took the liberty of just merging your PR so your contributions would make it into the 0.8.0 we just released. Thanks a lot for contributing! |
Set functions to modify ScriptableSentryUnityOptions from internal to public
Why?
Unity projects quickly outgrow the features provided by the default "Build" and "Build and run".
What ends up happening is that Unity users begin to script their builds from within via C#, which includes automated changing of various values for scriptable objects - think of information like branch/commithash/timestamp - that should be included in the game, but are only known during buildtime.
This pull requests make this possible for ScriptableSentryUnityOptions, to e.g. set the environment/release per branch or different dsn for production/development.