internal void SetAllModulesVisible(bool showAll)
{
EditorPrefs.SetBool("ParticleSystemShowAllModules", showAll);
ParticleSystemUI[] emitters = this.m_Emitters;
for (int i = 0; i < emitters.Length; i++)
{
ParticleSystemUI particleSystemUI = emitters[i];
for (int j = 0; j < particleSystemUI.m_Modules.Length; j++)
{
ModuleUI moduleUI = particleSystemUI.m_Modules[j];
if (moduleUI != null)
{
if (showAll)
{
if (!moduleUI.visibleUI)
{
moduleUI.visibleUI = true;
}
}
else
{
bool flag = true;
if (moduleUI is RendererModuleUI && particleSystemUI.GetParticleSystemRenderer() != null)
{
flag = false;
}
if (flag && !moduleUI.enabled)
{
moduleUI.visibleUI = false;
}
}
}
}
}
}