UnityEditor.DelayedCallback.Clear C# (CSharp) Method

Clear() public method

public Clear ( ) : void
return void
        public void Clear()
        {
            EditorApplication.update = (EditorApplication.CallbackFunction) Delegate.Remove(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
            this.m_CallbackTime = 0.0;
            this.m_Callback = null;
        }

Usage Example

        public void EndRename(bool acceptChanges)
        {
            EditorGUIUtility.editingTextField = false;
            if (!m_IsRenaming)
            {
                return;
            }

            Undo.undoRedoPerformed -= UndoRedoWasPerformed;
            if (m_DelayedCallback != null)
            {
                m_DelayedCallback.Clear();
            }

            RemoveMessage();

            if (isRenamingFilename)
            {
                m_Name = InternalEditorUtility.RemoveInvalidCharsFromFileName(m_Name, true);
            }

            m_IsRenaming         = false;
            m_IsWaitingForDelay  = false;
            m_UserAcceptedRename = acceptChanges;

            // For issuing event for client to react on end of rename
            RepaintClientView();
        }