protected void PlayAbilityParticleEffect() { GameObject particleObj = Instantiate(config.GetAbilityParticleEffect(), transform.position, Quaternion.identity, transform); ParticleSystem abilityParticleEffect = particleObj.GetComponentInChildren <ParticleSystem>(); abilityParticleEffect.Play(); Destroy(particleObj, abilityParticleEffect.main.duration + 2f); }