close ; Disable ParticleSystemRenderer on reset

pull/52/head
mob-sakai 2019-02-26 11:26:56 +09:00
parent e5f4009748
commit d9a43cd4a2
1 changed files with 15 additions and 0 deletions
Assets/Coffee/UIExtensions/UIParticle/Scripts

View File

@ -255,6 +255,21 @@ namespace Coffee.UIExtensions
base.OnDisable ();
}
#if UNITY_EDITOR
/// <summary>
/// Reset to default values.
/// </summary>
protected override void Reset ()
{
// Disable ParticleSystemRenderer on reset.
if (cachedParticleSystem)
{
cachedParticleSystem.GetComponent<ParticleSystemRenderer> ().enabled = false;
}
base.Reset ();
}
#endif
/// <summary>
/// Call to update the geometry of the Graphic onto the CanvasRenderer.
/// </summary>