- Home /
Question by
YinXiaozhou · Sep 28, 2016 at 03:19 AM ·
editor-scriptingbuildpipeline
PostProcessScene called before building the scene?
https://docs.unity3d.com/ScriptReference/Callbacks.PostProcessSceneAttribute.html In the doc it says "Add this attribute to a method to get a notification just after building the scene.". But it actually called before the scene building. For example if I use code below,
[PostProcessScene(0)]
static void PostScene()
{
foreach(var go in Object.FindObjectsOfType<GameObject>())
GameObject.DestroyImmediate(go);
}
There will be nothing in the scenes of the build. Is it a bug of the doc or a bug of the code?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612093616im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Modify "Builds Settings/Scenes to Build" in Script 2 Answers
Create text file of folder structure via EditorScript 1 Answer
Cancel build in PostProcessScene? 0 Answers
Custom DLL: mybuildcode.dll is identical to mybuildpluseditor.dll, but does not work in build 0 Answers
Editor Coroutines and Playmode 0 Answers