# GetScriptingDefineSymbols

> Gets the array of symbols for script compilation for the build target you select. Symbols are semicolon-separated. For example, "SYMBOL1;SYMBOL2".

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## GetScriptingDefineSymbols(NamedBuildTarget)

Gets the array of symbols for script compilation for the build target you select. Symbols are semicolon-separated. For example, "SYMBOL1;SYMBOL2".

```csharp
public static string GetScriptingDefineSymbols(NamedBuildTarget buildTarget)
```

### Parameters

**** (\[NamedBuildTarget]\(/engine/6000.0/script-reference/unityeditor/build/namedbuildtarget)): The [NamedBuildTarget](/engine/6000.0/script-reference/unityeditor/build/namedbuildtarget.md).

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Remarks

This method returns only the symbols stored in the Player settings. It doesn't include the symbols that an active build profile adds through [BuildProfile.scriptingDefines](/engine/6000.0/script-reference/unityeditor/build/profile/buildprofile/scriptingdefines.md).

Unity compiles scripts against both sets of symbols. To get the symbols that the active build profile contributes, read [BuildProfile.scriptingDefines](/engine/6000.0/script-reference/unityeditor/build/profile/buildprofile/scriptingdefines.md) on that profile.

### Examples

```csharp
using UnityEditor;
using UnityEditor.Build;
using UnityEngine;

public class GetScriptingDefineSymbolsExample
{
    [MenuItem("Tools/Log Scripting Define Symbols")]
    static void LogScriptingDefineSymbols()
    {
        // Using built-in constants.
        string standaloneDefines = PlayerSettings.GetScriptingDefineSymbols(NamedBuildTarget.Standalone);
        UnityEngine.Debug.Log("Standalone: " + standaloneDefines);

        // Migrating from BuildTargetGroup.
        NamedBuildTarget namedTarget = NamedBuildTarget.FromBuildTargetGroup(BuildTargetGroup.Android);
        string androidDefines = PlayerSettings.GetScriptingDefineSymbols(namedTarget);
        UnityEngine.Debug.Log("Android: " + androidDefines);
    }
}
```

## GetScriptingDefineSymbols(NamedBuildTarget, string\[])

Gets the array of user-specified symbols for script compilation for the build target you select.

```csharp
public static void GetScriptingDefineSymbols(NamedBuildTarget buildTarget, out string[] defines)
```

### Parameters

**** (\[NamedBuildTarget]\(/engine/6000.0/script-reference/unityeditor/build/namedbuildtarget)): **** (\[string\[]]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

### Remarks

This overload returns only the symbols stored in the Player settings. It doesn't include the symbols that an active build profile adds through [BuildProfile.scriptingDefines](/engine/6000.0/script-reference/unityeditor/build/profile/buildprofile/scriptingdefines.md).
