Now I wanna use SetScriptingDefineSymbols to set define symbol and then use BuildPipeline.BuildPlayer to build with Windows x64 target. However, if a define symbol exist in define constraint but not in PlayerSettings, and I use SetScriptingDefineSymbols to set define symbol. that will cause built PC package crush when running. As expected, that should be recompile and build successfully then run normally.
The error can reproduce by attached file code.
TestMan.cs (395 Bytes)
the target I wanna achieve is that after SetScriptingDefineSymbol, the assembly with define constraint will be recompile synchronously or give me a callback. Otherwise, BuildPipeline.BuildPlayer can’t find the assembly using define constraint
Is there any good solution for my problem?