Is there a way to run a script method automatically before I build via File > Build Settings... > Build
?
I know I can make a menu item to call my method and call build afterwards.
Is there a way to run a script method automatically before I build via File > Build Settings... > Build
?
I know I can make a menu item to call my method and call build afterwards.
You can Use IPreprocessBuildWithReport interface in Unity 5.6+
AFAIK, Unity API doesn't offer any pre-processing/pre-building capabilities connected to the build command from the menu.
But on the other hand, you can make an editor script that does all the process from building your DLLs, importing them and then building your app. Take a look at the BuildPipeline to achieve this purpose.
This way you can write your own pipeline. But you will need to call this from an editor script though, not from the menu as you asked for in your question.