unity粒子在Scene窗口未激活时不显示

如题,昨晚遇到了这个问题:在Editor里运行游戏时,如果点开Scene视图,粒子就能在Game视图中显示,否则,无法显示。思考良久没找到原因。同时,大部分粒子效果都还是正常的,说明是部分设置导致的这个原因。于是就比对和正常粒子的区别,比较半天,发现也没啥区别。

于是就对比了一下材质,发现无法显示的粒子使用了Soft particles属性,根据官方论坛上的解释,这种粒子需要使用Depth,需要在后期处理以及URP的设置中启用相关设置:

Soft particles require the camera to render to a depth texture so that particles can use it later in the transparent pass, post processing enables this by default as it needs it for depth of field and other effects. Make sure in the Lightweight Render Pipeline asset you have checked on depth texture, and depending on version you may also need to add an additional camera script to the camera, and then turn on depth there too.

于是找到URP pipeline的设置中,勾选Depth Texture,粒子终于恢复正常。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

77 + = 86