- Home /
How to execute script in scene on build before static batch?
Ok, title is pretty long but I really need to do this thing..
I want this. Every time I build player for any platform, I want scripts to get executed before static batch in scene (I want to modify/optimize static meshes).
That is! Does anyone has any idea, how to do this?
Answer by rutter · Jul 16, 2014 at 08:35 PM
If you have Unity Pro: you can fully script and automate the build pipeline, at which point you can do whatever you want.
Otherwise: you can't script the build process, but you can create a MenuItem that you click before building.
Oh I see what you mean by $$anonymous$$enuItem. Ok cool. Looks like I really should get Unity Pro. :) Soon...
Answer by Kaz_Yamof · Jul 16, 2014 at 08:53 PM
Try: Edit/Project Settings/ Scritp Execution Order. See: http://docs.unity3d.com/Manual/class-ScriptExecution.html
Script Execution Order is just for defining order of initialization.. does not serve me right in this order.
Your answer
Follow this Question
Related Questions
Compiling HDRP/Lit shader takes 41 minutes, how can I reduce this? 1 Answer
Build addressables in custom build script 4 Answers
How can I utilize different source files when building to different platforms? 0 Answers
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers
How to build from script while using build settings from editor? 0 Answers