[英]How can i turn off or on post processing for all scenes in Unity
So I made a checkbox in my title screen but I can't figure out how to enable or disable post-processing in all scenes with it.所以我在我的标题屏幕上做了一个复选框,但我不知道如何在所有场景中启用或禁用后期处理。 I'm using Unity 2020.1 and I have it linked to my code like this我使用的是 Unity 2020.1,我将它链接到我的代码,如下所示
There's a few routes you could take with this.您可以采用几条路线。
You could take the post processing volume(s) that you wish to disable as a parameter into your script, anddisable/enable them like any other component.您可以将希望禁用的后处理体积作为参数放入脚本中,并像任何其他组件一样禁用/启用它们。
You could put the post processing volume(s) on their own GameObject(s) and disable/enable the GameObjects.您可以将后处理体积放在它们自己的游戏对象上并禁用/启用游戏对象。
I believe in at least URP, you can enable/disable post processing all together through rendering options of the camera you are using.我相信至少在 URP 中,您可以通过您正在使用的相机的渲染选项一起启用/禁用后期处理。 Not 100% sure on this one though, but worth may be looking into.虽然不能 100% 确定这一点,但值得研究。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.