- Home /
Dialog Box in Build Settings
Hello all! Does anyone know of a way to add in a dialog box to the build settings menu? I am notorious for not resetting my in-game configs (Dev Mode, etc) and am hoping to have Unity warn me before I build with those settings on. Thanks!
Sorry if this has been asked before. Did a bit of searching through the posts here and googling for it, but didn't find anything along those lines.
Answer by HenryStrattonFW · Jan 19, 2017 at 12:40 AM
To my knowledge no there is no way to add things to the build settings menu. However there are still options that may suffice. Here are the options that come to mind.
Build with an automation tool: You can then have actions run prior to the build, using one of those to validate/check your settings and then warn you (or even better, automatically set them based on build properties provided). I use uTomate which is absolutely fantastic for build task automation/validation, but i'm sure there are alternatives out there as well.
After the fact: You can write a static method in an editor script with the PostProcessBuild attribute https://docs.unity3d.com/ScriptReference/Callbacks.PostProcessBuildAttribute.html This will then run your custom method after a build, at which point you could just check your settings and fire up a dialog if the settings are undesired (you only find out after the build though, so not optimal, but perhaps better than nothing).
There may be other methods that I'm, just not aware of, but these would be the ones I would go for. I'm a fan of #1 as its very versatile and really great for automating all sorts of tasks, build or otherwise. However it may be overkill for what you want, so there's always option 2. (also 2 is free, I think uTomate still has a free demo version that might do enough for you, but the full version is a paid asset).