- Home /
Disable components in runtime per quality setting ?
Hello,
Is it possible to disable components, such as the image effects on the camera, at runtime, depending on the quality setting specified by the user?
For instance disabling vignetting / bloom for the low quality setting, as these are quite resource demanding.
Thanks.
Answer by Graham-Dunnett · Oct 10, 2014 at 09:30 AM
At run time use QualitySettings.GetQualityLevel()
to get the quality level, then early-out the script code that implements the effects. For example, the OnRenderImage() in Bloom.js checks to see if the feature is supported, and just does a Blit if it's not supported. You could modify that to stop doing Bloom when the quality setting is too low. (Or take a look at PostEffectBase.js, and the CheckSupport() function it defines.)