Forece recompile from code after modifying scriptingDefines
I have an editor script which uses PlayerSettings.SetScriptingDefineSymbolsForGroup to set the scripting defines. After that I call AssetDatabase.Refresh(). But that doesn't trigger recompilation. There are some part of my code which are active depending on what is in the scripting define symbols. If I don't use the script, just write the values in player settings manually, it triggers a recompile and works fine. Any solution to that?
Answer by cavali3ro · Oct 18, 2017 at 06:27 AM
I think the recompile is triggered, but the VisualStudio is not reloading the solution. I'm adding a DELETEME define symbol at the end, then enter PlayerSettingss and doubleclick/delete it -> that forces a reload of the solution, but it's manual. Let me know if you find a way to reload the solution from an Editor script
https://gamedev.stackexchange.com/questions/124320/force-reload-vs-soution-explorer-when-adding-new-c-script-via-unity3d after a better look found this thread
Answer by gevasaf · Jan 26 at 09:42 AM
I'm also curious to know if there's a way to force recompilation that takes the new scripting symbols into account.
Currently I manually minimize the editor and then maximize it again to trigger the refresh.
Your answer
Follow this Question
Related Questions
CreateAsset Moving file failed 1 Answer
Changes to asset data persist - unable to discard changes 1 Answer
Can WebGL Templates be dynamically modified via scripting? 0 Answers
How can I save a texture and edit its importer options with TextureImporter in the same pass? 1 Answer
How can I get a sub asset? 1 Answer