ParticleSystem.textureSheetAnimation

매뉴얼로 전환
public ParticleSystem.TextureSheetAnimationModule textureSheetAnimation ;

설명

Script interface for the TextureSheetAnimationModule of a Particle System.

This module allows you to add animations to your particle textures. This is achieved by authoring flipbook textures, which look like this:



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.

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; } }