UnityEditor.SubModuleUI.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
        private void Update()
        {
            if ((this.m_CheckObjectIndex >= 0) && !ObjectSelector.isVisible)
            {
                SerializedProperty property2 = this.m_SubEmitters.GetArrayElementAtIndex(this.m_CheckObjectIndex).FindPropertyRelative("emitter");
                Object objectReferenceValue = property2.objectReferenceValue;
                ParticleSystem subEmitter = objectReferenceValue as ParticleSystem;
                if (subEmitter != null)
                {
                    bool flag = true;
                    if (this.ValidateSubemitter(subEmitter))
                    {
                        string str = ParticleSystemEditorUtils.CheckCircularReferences(subEmitter);
                        if (str.Length == 0)
                        {
                            this.CheckIfChild(objectReferenceValue);
                        }
                        else
                        {
                            string message = string.Format("'{0}' could not be assigned as subemitter on '{1}' due to circular referencing!\nBacktrace: {2} \n\nReference will be removed.", subEmitter.gameObject.name, base.m_ParticleSystemUI.m_ParticleSystem.gameObject.name, str);
                            EditorUtility.DisplayDialog("Circular References Detected", message, "Ok");
                            flag = false;
                        }
                    }
                    else
                    {
                        flag = false;
                    }
                    if (!flag)
                    {
                        property2.objectReferenceValue = null;
                        base.m_ParticleSystemUI.ApplyProperties();
                        base.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.Repaint();
                    }
                }
                this.m_CheckObjectIndex = -1;
                EditorApplication.update = (EditorApplication.CallbackFunction) Delegate.Remove(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
            }
        }