This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree
PostProcessing/Editor/Tools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System ;
12using System . Linq ;
23
34namespace UnityEditor . Rendering . PostProcessing
@@ -9,20 +10,26 @@ sealed class DefineSetter
910
1011 static DefineSetter ( )
1112 {
12- var target = EditorUserBuildSettings . selectedBuildTargetGroup ;
13- var defines = PlayerSettings . GetScriptingDefineSymbolsForGroup ( target ) . Trim ( ) ;
13+ var targets = Enum . GetValues ( typeof ( BuildTargetGroup ) )
14+ . Cast < BuildTargetGroup > ( )
15+ . Where ( x => x != BuildTargetGroup . Unknown ) ;
1416
15- var list = defines . Split ( ';' , ' ' )
16- . Where ( x => ! string . IsNullOrEmpty ( x ) )
17- . ToList ( ) ;
17+ foreach ( var target in targets )
18+ {
19+ var defines = PlayerSettings . GetScriptingDefineSymbolsForGroup ( target ) . Trim ( ) ;
1820
19- if ( list . Contains ( k_Define ) )
20- return ;
21+ var list = defines . Split ( ';' , ' ' )
22+ . Where ( x => ! string . IsNullOrEmpty ( x ) )
23+ . ToList ( ) ;
2124
22- list . Add ( k_Define ) ;
23- defines = list . Aggregate ( ( a , b ) => a + ";" + b ) ;
25+ if ( list . Contains ( k_Define ) )
26+ return ;
2427
25- PlayerSettings . SetScriptingDefineSymbolsForGroup ( target , defines ) ;
28+ list . Add ( k_Define ) ;
29+ defines = list . Aggregate ( ( a , b ) => a + ";" + b ) ;
30+
31+ PlayerSettings . SetScriptingDefineSymbolsForGroup ( target , defines ) ;
32+ }
2633 }
2734 }
2835}
You can’t perform that action at this time.
0 commit comments