[SOLVED] ImageEffectAllowedInSceneView does not update

This Unity 5.4 class annotation works fine and image effect show in Scene View but I’ve found that if I change some settings in the image effect, it gets updated only in GameView. Scene View still shows previous rendered effect. To force refresh I need to disable and re-enable the image effect.

Tested on Mac.

Is this a bug?

Custom effect or non custom effect?

Custom image effect that uses OnRenderImage and has the [ImageEffectAllowedInSceneView] added to the class level.

The curious thing is after your reply I have added that annotation to Global Fog and it works properly, but the source code does not tell me nothing special that could differentiate both image effects.

Any idea?

My image effect uses a custom inspector. But Global Fog does not. Perhaps there’s some callback I should use from the custom inspector?

Do you have:
Unity - Scripting API: ExecuteInEditMode on your script?

Yep.

I’ll submit a bug report today with a repro project.

Got a reply from Unity QA. They have reproduced the issue (821759) and have passed it to dev.

yep I saw it come in. will be taking a look either tomorrow or the day after.

1 Like

Ok, so the issue was caused by a material update that was not being serialised. In the image effect, this material is dynamically updated based on changes in a custom inspector but as a private field nothing was informing the Editor after the material changed.

So, the solution that worked for me (thanks to @Tim-C !!) was to just add the [SerializeField] annotation to the private material field! :slight_smile: