Objective:
Add a new macro definition to an existing macro definition
//Get which platform you are currently on
BuildTargetGroup buildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
//Get macro definitions that are already available for the current platform
var symbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(buildTargetGroup);
//Add the macro definition you want
if (!symbols.Contains("SARF"))
{
string str = "";
str = symbols + ";SARF";
PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTargetGroup, str);
}
Similar Posts:
- Error: expected identifier before numeric constant [Solved]
- [Solved] Undefined reference_G++ _GLIBCXX_USE_CXX11_ ABI compilation error: STD:: Basic_String and STD::__cxx11::basic_String cannot match
- [Solved] VS winsock.h and ws2def.h a large number of redefined error
- C1189 #error: “No Target Architecture”
- How to Solve MSB8020 The build tools for v141 (Platform Toolset = ‘v141‘) cannot be found. To build using the
- About the compilation error “dereferencing pointer to incomplete type
- Debugging using Windbg : Symbols loading
- [Solved] Docker Startup Error: failed to start docker Application container Engin
- [Solved] A label can only be part of statement and a declaratioin is not a statement
- GCC refers to math. H header file, and there are some errors such as undefined reference to ` POW ‘when compiling