- Home /
How to get default script defines?
Is there a way to get the current default script defines which Unity is using?
For example UNITY_EDITOR, UNITY_DEBUG etc.
Answer by StaNov · Jan 20, 2017 at 08:55 AM
I found it. For any future pilgrims:
UnityEditor.EditorUserBuildSettings.activeScriptCompilationDefines
Answer by steo · Jan 19, 2017 at 05:06 PM
You can see prerocessor defines in .csproj files into <DefineConstants>...</DefineConstants>
tag.
Thanks for you reply! But is there a way to get the defines from Editor script? I guess I can read the csproj file and parse it, but I thought there would be a one line method call for that...
Your answer
Follow this Question
Related Questions
How do you run File->Build Settings... from code? 0 Answers
How does conrolID work with ShowObjectPicker? 1 Answer
Unity UI 4.6 - Programmatically adding events - EventTrigger.delegates is null 0 Answers
How to add a component on a GameObject in Custom Inspector 1 Answer
Make the Inspector only show a specific CustomEditor 1 Answer