Мои Уведомления
Привет, !
Мой Аккаунт Мои Финансы Мои Подписки Мои Настройки Выход
Руководство API скрипты

Объявление

public void AddSprite(Sprite sprite);

Параметры

sprite Добавляемый спрайт.

Описание

Добавить новый спрайт.

Смотрите так же: ParticleSystem.TextureSheetAnimationModule.RemoveSprite.

using UnityEngine; using System.Collections; [RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps; private Sprite sprite; void Start() { ps = GetComponent<ParticleSystem>(); sprite = Sprite.Create(Texture2D.whiteTexture, new Rect(0, 0, 1, 1), Vector2.zero); var textureSheetAnimation = ps.textureSheetAnimation; textureSheetAnimation.enabled = true; textureSheetAnimation.mode = ParticleSystemAnimationMode.Sprites; textureSheetAnimation.AddSprite(sprite); } }
Вы можете отблагодарить автора, за перевод документации на русский язык. ₽ Спасибо
API скрипты 2021.3