fix on editor: on select UIParticle, particles will be cleared

This commit is contained in:
mob-sakai
2022-06-21 19:47:08 +09:00
parent 8c959b257c
commit 4fe9a3200d
3 changed files with 22 additions and 6 deletions

View File

@@ -135,6 +135,9 @@ namespace Coffee.UIExtensions
gameObject.layer = parent.gameObject.layer;
_particleSystem = particleSystem;
#if UNITY_EDITOR
if (Application.isPlaying)
#endif
if (_particleSystem.isPlaying)
{
_particleSystem.Clear();