ParticleSystem.textureSheetAnimation

Switch to Manual
public ParticleSystem.TextureSheetAnimationModule textureSheetAnimation ;

Description

Script interface for the Particle System Texture Sheet Animation module.

通过此模块可以向粒子纹理添加动画。这通过创作翻页纹理来实现,这些纹理类似于下面这样:



每个编号区域都表示动画的一帧,必须在纹理中均匀分布。 在下面选择变量可查看脚本示例。您可能要在粒子系统上将此纹理与每个示例一起使用,以查看该模块的工作方式。

Particle System modules do not need to be reassigned back to the system; they are interfaces and not independent objects.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { ParticleSystem ps = GetComponent<ParticleSystem>(); var ts = ps.textureSheetAnimation; ts.enabled = true; ts.numTilesX = 2; ts.useRandomRow = true; } }