UnityEditor.SubModuleUI.ValidateSubemitter C# (CSharp) Method

ValidateSubemitter() private method

private ValidateSubemitter ( ParticleSystem subEmitter ) : bool
subEmitter UnityEngine.ParticleSystem
return bool
        private bool ValidateSubemitter(ParticleSystem subEmitter)
        {
            if (subEmitter == null)
            {
                return false;
            }
            ParticleSystem root = base.m_ParticleSystemUI.m_ParticleEffectUI.GetRoot();
            if (root.gameObject.activeInHierarchy && !subEmitter.gameObject.activeInHierarchy)
            {
                string message = string.Format("The assigned sub emitter is part of a prefab and can therefore not be assigned.", new object[0]);
                EditorUtility.DisplayDialog("Invalid Sub Emitter", message, "Ok");
                return false;
            }
            if (!root.gameObject.activeInHierarchy && subEmitter.gameObject.activeInHierarchy)
            {
                string str2 = string.Format("The assigned sub emitter is part of a scene object and can therefore not be assigned to a prefab.", new object[0]);
                EditorUtility.DisplayDialog("Invalid Sub Emitter", str2, "Ok");
                return false;
            }
            return true;
        }