Pretty much what the title says. The PostProcessScene attribute works properly in editor, and debug logs say that it is fired during build sequences, but no changes to the scene ever make it to the built product.
Simplified example of my code:
[PostProcessScene(-1)]
public static void OnPostprocessScene()
{
Debug.Log("OnPostprocessScene called");
GameObject.CreatePrimitive(PrimitiveType.Cube).transform.position = Vector3.zero;
}
I found a bug report here dating back to 3.5.6 - https://fogbugz.unity3d.com/default.asp?501928_jte739hnp32m9ebb
Testing in the latest build of Unity (4.1.3 at time of writing) this bug is not yet fixed.
So my question is how can I reliably hook and perform scene actions during the compile staging period? Ideally a solution would work with Unity 3.5 and up, but at this point I’d settle for a non-universal solution.