Hi guys,
i was wondering if there is a way to create a seamless particle animation, which can be played in a loop.
Need this for animating smog on mobile, by creating a texture animation.
If unity does not support this, are there any programms / librarys where you can create such seamless animations?
But this has no effect. The animation is still complete random (tested with loop, without loop, prewarm, etc). Its like the seed value gets ignored completely, using 5.3.0f4.
And even if the seed would be used, since its a endless range, this wouldn´t mean that it repeats seamlessley, or did this work in older versions?
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
[RequireComponent(typeof(ParticleSystem))]
public class ParticleSeamlessLoopScript : MonoBehaviour {
public ParticleSystem ps;
void LateUpdate () {
ps = GetComponent<ParticleSystem>();
ps.randomSeed = 1;
if (ps.time >= ps.duration)
{
ps.Stop();
ps.Play();
}
}
}
Works in the editor, but only when not in play mode! The seed is still somewhat respected in play mode, but you need to spawn a new particle system each “loop”.
Hi Karl,
my project is too big, will make an extract, meanwhile will check on the latest version. The effect I am aiming at is ground particle fog that just stays there.
Thank you!
Best