private void InitEffectUI()
{
if (!this.m_IsVisible)
{
return;
}
ParticleSystem particleSystem = ParticleSystemEditorUtils.lockedParticleSystem;
if ((Object)particleSystem == (Object)null && (Object)Selection.activeGameObject != (Object)null)
{
particleSystem = Selection.activeGameObject.GetComponent <ParticleSystem>();
}
this.m_Target = particleSystem;
if ((Object)this.m_Target != (Object)null)
{
if (this.m_ParticleEffectUI == null)
{
this.m_ParticleEffectUI = new ParticleEffectUI((ParticleEffectUIOwner)this);
}
if (this.m_ParticleEffectUI.InitializeIfNeeded(this.m_Target))
{
this.Repaint();
}
}
if (!((Object)this.m_Target == (Object)null) || this.m_ParticleEffectUI == null)
{
return;
}
this.Clear();
this.Repaint();
SceneView.RepaintAll();
GameView.RepaintAll();
}