public bool ValidateParticleSystemProperty(SerializedProperty shurikenProperty)
{
if (shurikenProperty != null)
{
ParticleSystem objectReferenceValue = shurikenProperty.objectReferenceValue as ParticleSystem;
if ((objectReferenceValue != null) && (this.GetParticleSystemUIForParticleSystem(objectReferenceValue) == null))
{
EditorUtility.DisplayDialog("ParticleSystem Warning", "The SubEmitter module cannot reference a ParticleSystem that is not a child of the root ParticleSystem.\n\nThe ParticleSystem '" + objectReferenceValue.name + "' must be a child of the ParticleSystem '" + ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystem).name + "'.", "Ok");
shurikenProperty.objectReferenceValue = null;
return false;
}
}
return true;
}