public override bool PrepareElementForAttachment(EditorGUIElement element) { element.RemoveAttachments(delegate(EditorGUIElementAttachment attachment) { EditorGUIElementAttachment_Singular cast; if (attachment.Convert <EditorGUIElementAttachment_Singular>(out cast)) { if (cast.singular_id == singular_id) { return(true); } } return(false); }); return(true); }
public void RemoveAttachments(Predicate <EditorGUIElementAttachment> predicate) { element.RemoveAttachments(predicate); }