feat: preview the ParticleSystem playback when selecting a UIParticle in the Editor

This commit is contained in:
mob-sakai
2026-06-23 19:03:37 +09:00
parent 6b956b92e0
commit 1ac1b347af
6 changed files with 277 additions and 11 deletions

View File

@@ -545,7 +545,10 @@ namespace Coffee.UIExtensions
{
var ps = particles[i];
if (!ps
#if UNITY_EDITOR
|| (ps.hideFlags & HideFlags.DontSave) != 0 // Dummy ParticleSystems for preview.
|| ps.gameObject.CompareTag("EditorOnly") // Ignore "EditorOnly" tagged ParticleSystems.
#endif
|| ps.GetComponentInParent<UIParticle>(true) != this) // Ignore ParticleSystems that are not under this UIParticle.
{
particles.RemoveAt(i);