close #45; Disable ParticleSystemRenderer on reset

pull/77/head
mob-sakai 2019-02-26 11:26:56 +09:00
parent beb6fa8367
commit f6e64c325b
1 changed files with 15 additions and 0 deletions

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>