- Home /
AssetDatabase.Refresh() no longer recompiling my generated scripts
I have an editor extension that overwrites and creates script files in the project using calls such as File.WriteAllText(). And to force the editor to compile the new changes I call AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport)
but after the recent version of Unity it no longer works. Instead I need to switch focus back and forth from unity editor for it to notice the changes and compile the new code content generated. Any ideas on how to fix this?
E.g. can I tell the asset database that a particular script has been changed and force the update on it? Or trigger this refocus/focus refresh logic in code?
Your answer

Follow this Question
Related Questions
Help with Missing Monobehaviours and Asset Serialization? 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Accessing a game script from an editor script. C# 0 Answers
Visual Studio Setup 2 Answers