TextureSheetAnimationModule

struct in UnityEngine

Switch to Manual

Description

纹理帧动画模块的脚本接口。

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



Each numbered region represents a frame of the animation, and must be distributed evenly across the texture. Select a variable below to see script examples. You may want to use this texture on your Particle System with each example, to see how the module works.

另请参阅:ParticleSystemParticleSystem.textureSheetAnimation

Variables

animation指定动画类型。
cycleCount指定动画在粒子生命周期内的循环次数。
enabled启用/禁用纹理帧动画模块。
fpsControl how quickly the animation plays.
frameOverTime曲线,用于控制要播放的纹理帧动画的帧。
frameOverTimeMultiplier随时间变化的帧乘数。
mode选择动画纹理信息是来自单个纹理上的帧网格,还是来自精灵对象的列表。
numTilesX定义纹理在 X 轴上的平铺。
numTilesY定义纹理在 Y 轴上的平铺。
rowIndexExplicitly select which row of the texture sheet is used, when ParticleSystem.TextureSheetAnimationModule.rowMode is set to Custom.
speedRangeSpecify how particle speeds are mapped to the animation frames.
spriteCount精灵总数。
startFrame为纹理帧动画定义随机初始帧。
startFrameMultiplier初始帧乘数。
timeModeSelect whether the playback is based on mapping a curve to the lifetime of each particle, by using the particle speeds, or if playback simply uses a constant frames per second.
useRandomRow对发射的每个粒子使用纹理帧的随机行。
uvChannelMask选择将接收纹理动画的 UV 通道。

Public Functions

AddSprite添加新精灵。
GetSprite获取指定索引处的精灵。
RemoveSprite从数组给定索引处删除精灵。
SetSprite设置给定索引处的精灵。