public void OnGui()
        {
            EditorPrefs.SetBool(SyncPrefKey,
                                EditorGUILayout.ToggleLeft("Sync to Hierarchy:", EditorPrefs.GetBool(SyncPrefKey, false)));

            GameObject newSelection = EditorGUILayout.ObjectField(m_currentNode, typeof(GameObject), true) as GameObject;

            bool selectionChanged = newSelection != null && newSelection != m_currentNode;

            m_currentNode = newSelection;

            if (selectionChanged || (m_currentNode != null && GUILayout.Button("Select")))
            {
                _viewerWindow.ChangeSelection(m_currentNode.GetHashCode().ToString(), HandledType);
            }
        }
        private void DisplayFilterOptions()
        {
            EditorGUILayout.BeginVertical();

            Object newSelectedAsset = EditorGUILayout.ObjectField(_selectedAsset, typeof(Object), false);

            if (newSelectedAsset != _selectedAsset)
            {
                string fileId = NodeDependencyLookupUtility.GetAssetIdForAsset(newSelectedAsset);
                _viewerWindow.ChangeSelection(fileId, GetHandledType());

                _selectedAsset = newSelectedAsset;
            }

            float origWidth = EditorGUIUtility.labelWidth;

            EditorGUIUtility.labelWidth = 50;
            _filterString.DirtyOnChange(EditorGUILayout.TextField("Filter:", _filterString, GUILayout.MinWidth(200)));
            EditorGUIUtility.labelWidth = origWidth;

            if (GUILayout.Button("Apply"))
            {
                _filteredNodes = CreateFilter(_filterString);
                _viewerWindow.InvalidateNodeStructure();
            }

            AssetRelationsViewerWindow.TogglePref(_explorerSyncModePref, "Sync to explorer:", b =>
            {
                if (b)
                {
                    RegisterOnSelectionChanged();
                }
                else
                {
                    UnregisterOnSelectionChanged();
                }
            });

            EditorGUILayout.EndVertical();
        }