UE5.1_Niagara基础_官方内容示例_3.3
3.3 Visibility Tag【可见性标签】
NOTE: If the desire is to simply pick from a given array of meshes inside a single mesh renderer, there is a mesh array feature that is better suited to this specific task. Simply assign your meshes to the mesh array, and in the Initialize Particle, set Mesh Renderer Array Visibility and choose your renderer from the dropdown.
This visibility tag feature is more for when you want to pick between sprite, mesh, light, or other renderers.
【注:如果只是需要在一个网格体渲染器里的给定一组网格体中挑选某个网格体渲染,那么直接使用网格体数组功能即可。把网格体加入到在网格体数组中,在初始化粒子模组里,设置网格体渲染器数组可见性并选择使用的渲染器】
【这个可见性标签功能针对的是用于挑选不同的渲染器】
Here, we pick a random integer between 0 and 3 (those are the numbers assigned to the "Renderer Visibility" settings on the renderers).
Doing this in particle spawn creates a stable Particles.VisibilityTag which is used to randomly choose one of the available sprite or mesh renderers.
【这里,我们设置了随机0到3的整数(这些数值是分配给渲染器设置的“Renderer Visibility”里的)】
【在粒子生成时创建一个稳定的Particles.VisibilityTag变量用于选择使用渲染器】
Here, we animate the visiblity tag over the lifetime of the particle, advancing through the assigned renderers as the particle's life evolves.
【这里,我们随粒子寿命动态改变可见性标签,使粒子随生成周期的演变而使用不同的渲染器】
Initialize Particle【初始化粒子】模组
Mesh Renderer Array Visibility Mode【网格体数组可见性模式】
渲染器
Renderer Visibility【渲染器可见性】:Particles.VisibilityTag与此数值一样时,此渲染器可见