ParticleSystemRenderer.BakeTexture
Declaration
public int BakeTexture(ref Texture2D verticesTexture, ParticleSystemBakeTextureOptions options);public int BakeTexture(ref Texture2D verticesTexture, Camera camera, ParticleSystemBakeTextureOptions options);public int BakeTexture(ref Texture2D verticesTexture, ref Texture2D indicesTexture, ParticleSystemBakeTextureOptions options);public int BakeTexture(ref Texture2D verticesTexture, ref Texture2D indicesTexture, Camera camera, ParticleSystemBakeTextureOptions options);Параметры
| Параметр | Описание |
|---|---|
| verticesTexture | Texture2D для получения снимка вершин частиц. |
| indicesTexture | Необязательный Texture2D для получения мгновенного изображения индексов частиц. |
| камера | Camera используется для определения того, в каком направлении находятся частицы камеры-пространства. |
| варианты | Указывает, следует ли включать вращение и масштаб Transform в запеченную Texture2D. |
Возвращаемое значение
инт Количество индексов, используемых Particle System.
Описание
Создает снимок ParticleSystemRenderer и хранит его в Texture2D.