粒子系统不可见 - HDRP
Particle system invisible - HDRP
问题
我的粒子效果不再可见。我不确定这到底是什么时候发生的。我最近将我的项目转换为 HDRP,但我几乎肯定它在执行此操作后可以工作一段时间,尽管我不能 100% 确定。我使用了HDRP转换精灵,转换了所有素材并升级到最新版本。
粒子系统在它应该在的地方被实例化:
系统保留在我的层次结构中,直到它最终被更新中的这段代码销毁:
private void ManageDustEffects()
{
List<GameObject> dustToRemove = new List<GameObject>();
// mark which particles should be removed
foreach (GameObject effect in instantiatedDustList)
{
if (false == effect.GetComponent<ParticleSystem>().IsAlive())
{
dustToRemove.Add(effect);
}
}
// remove and destroy them
foreach (GameObject effect in dustToRemove)
{
instantiatedDustList.Remove(effect);
Destroy(effect);
}
}
设置
Material:
这可能是什么原因造成的?是着色器吗?这里的这个人说着色器在 HDRP https://answers.unity.com/questions/1745971/using-shuriken-particles-with-hdrp-on.html 中工作,这是我在 HDRP
之前使用的着色器
其他人为我提供了这些 HDRP-specific 粒子着色器,解决了问题:
问题
我的粒子效果不再可见。我不确定这到底是什么时候发生的。我最近将我的项目转换为 HDRP,但我几乎肯定它在执行此操作后可以工作一段时间,尽管我不能 100% 确定。我使用了HDRP转换精灵,转换了所有素材并升级到最新版本。
粒子系统在它应该在的地方被实例化:
系统保留在我的层次结构中,直到它最终被更新中的这段代码销毁:
private void ManageDustEffects()
{
List<GameObject> dustToRemove = new List<GameObject>();
// mark which particles should be removed
foreach (GameObject effect in instantiatedDustList)
{
if (false == effect.GetComponent<ParticleSystem>().IsAlive())
{
dustToRemove.Add(effect);
}
}
// remove and destroy them
foreach (GameObject effect in dustToRemove)
{
instantiatedDustList.Remove(effect);
Destroy(effect);
}
}
设置
Material:
这可能是什么原因造成的?是着色器吗?这里的这个人说着色器在 HDRP https://answers.unity.com/questions/1745971/using-shuriken-particles-with-hdrp-on.html 中工作,这是我在 HDRP
之前使用的着色器其他人为我提供了这些 HDRP-specific 粒子着色器,解决了问题: