Version: 2021.3
言語: 日本語
public Vector2 speedRange ;

説明

Specify how particle speeds are mapped to the animation frames.

If a particle is travelling slower than the minimum speed, it uses the first frame. If a particle is travelling faster than the maximum speed, then it uses the final frame. For all other speeds, the particle chooses a frame based on how far between the minimum and maximum value its speed is.

using UnityEngine;
using System.Collections;

[RequireComponent(typeof(ParticleSystem))] public class ExampleClass : MonoBehaviour { private ParticleSystem ps;

void Start() { ps = GetComponent<ParticleSystem>();

var textureSheetAnimation = ps.textureSheetAnimation; textureSheetAnimation.enabled = true; textureSheetAnimation.speedRange = new Vector2(0.9f, 5.0f); } }
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961