add vfx graph package
add vfx graph learning templates add vfx arc example
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
public class ModifyParticleSystem : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private ParticleSystem particleSystem;
|
||||
[SerializeField] private Transform[] objects;
|
||||
|
||||
|
||||
private ParticleSystem.Particle[] _particles = new ParticleSystem.Particle[1000]; // is a buffer
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
// particleSystem.Emit();
|
||||
|
||||
// ParticleSystem.MainModule main = particleSystem.main;
|
||||
// main.startSpeed = 10;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
int activeParticles = particleSystem.GetParticles(_particles);
|
||||
for (int i = 0; i < activeParticles; i++)
|
||||
{
|
||||
// use or change particles
|
||||
|
||||
// _particles[i].velocity *= 1.1f;
|
||||
// objects[i].position = _particles[i].position;
|
||||
}
|
||||
|
||||
// set particles
|
||||
particleSystem.SetParticles(_particles, activeParticles);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 124fae8104fd4b9c9ca9f0b4b95b7ce4
|
||||
timeCreated: 1765477206
|
||||
Reference in New Issue
Block a user