Fixed a bug where Experimental Features Enabled was not activating
#441
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Fixed a bug where
Experimental Features Enabledwas not activating when usingDedicated Serverplatform.Basically the user was clicking on "Experimental Features Enabled" and nothing was happening.
After investigation, he is using the Dedicated server as a platform. The problem is coming from the fact that this platform as not been added in the
BuildTargetGroupenum and thus was not impacted by the Settings adding the Scripting Define Symbol as this symbol was not added for that specific target.Moreover the Symbols were set by ProBuilder using
PlayerSettings.[Get/Set]ScriptingDefineSymbolsForGroupwhich have been deprecated since. This PR update this as well for Unity 2021.2 and after wherePlayerSettings.[Get/Set]ScriptingDefineSymbolshave been introduced.This is now getting the valid platforms from
BuildPlatforms.instance.GetValidPlatformsrather than going throughSystem.Enum.GetValues(typeof(BuildTargetGroup))Tested against Unity 2023.1.0a13, 2022.2.0a18, 2022.1.3f1, 2021.3.7f1 and 2021.2.0b12
Links
Jira: https://jira.unity3d.com/browse/PBLD-34
Comments to Reviewers
[List known issues, planned work, provide any extra context for your code.]