private GetParticleSystemRenderer ( ) : |
||
Результат |
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; } } } } } }
internal void RefreshShowOnlySelected() { if (this.IsShowOnlySelectedMode()) { int[] instanceIDs = Selection.instanceIDs; ParticleSystemUI[] emitters = this.m_Emitters; for (int i = 0; i < emitters.Length; i++) { ParticleSystemUI particleSystemUI = emitters[i]; ParticleSystemRenderer particleSystemRenderer = particleSystemUI.GetParticleSystemRenderer(); if (particleSystemRenderer != null) { particleSystemRenderer.editorEnabled = instanceIDs.Contains(particleSystemUI.m_ParticleSystem.gameObject.GetInstanceID()); } } } else { ParticleSystemUI[] emitters2 = this.m_Emitters; for (int j = 0; j < emitters2.Length; j++) { ParticleSystemUI particleSystemUI2 = emitters2[j]; ParticleSystemRenderer particleSystemRenderer2 = particleSystemUI2.GetParticleSystemRenderer(); if (particleSystemRenderer2 != null) { particleSystemRenderer2.editorEnabled = true; } } } }