/// <inheritdoc />
        public override void OnInspectorGUI()
        {
            // invoke base method
            base.OnInspectorGUI();

            EditorGUILayout.Space();
            if (GUILayout.Button("Regenerate Identity", GUILayout.Height(25)))
            {
                EditorUtility.SetDirty(target);
                var prefab = (QNetObjectPrefab)target;

                var prefabsGUIDs  = AssetDatabase.FindAssets($"t:{nameof(QNetObjectPrefab)}");
                var loadedPrefabs = new QNetObjectPrefab[prefabsGUIDs.Length];
                for (var index = 0; index < prefabsGUIDs.Length; index++)
                {
                    loadedPrefabs[index] =
                        (QNetObjectPrefab)AssetDatabase.LoadAssetAtPath(
                            AssetDatabase.GUIDToAssetPath(prefabsGUIDs[index]), typeof(QNetObjectPrefab));
                }

                var identity = (short)Random.Range(short.MinValue, short.MaxValue);
                while (loadedPrefabs.Any(p => p.PrefabIdentity == identity))
                {
                    identity = (short)Random.Range(short.MinValue, short.MaxValue);
                }

                prefab.PrefabIdentity = identity;

                AssetDatabase.Refresh();
                AssetDatabase.SaveAssets();
            }
        }
        public override void OnInspectorGUI()
        {
            if (!InternalReady())
            {
                InternalUpdateScript();
                EditorGUILayout.HelpBox($"Unable to draw {nameof(QNetDatabase)} inspector gui. Target script is null.",
                                        MessageType.Error);
                return;
            }

            serializedObject.Update();
            EditorGUILayout.PropertyField(PlayerPrefab, true);
            EditorGUILayout.PropertyField(Prefabs, true);

            EditorGUILayout.Space();
            if (GUILayout.Button("Refresh Prefabs", GUILayout.Height(25)))
            {
                EditorUtility.SetDirty(target);
                var prefabsGUIDs  = AssetDatabase.FindAssets($"t:{nameof(QNetObjectPrefab)}");
                var loadedPrefabs = new QNetObjectPrefab[prefabsGUIDs.Length];
                for (var index = 0; index < prefabsGUIDs.Length; index++)
                {
                    loadedPrefabs[index] =
                        (QNetObjectPrefab)AssetDatabase.LoadAssetAtPath(
                            AssetDatabase.GUIDToAssetPath(prefabsGUIDs[index]), typeof(QNetObjectPrefab));
                }
                Script.Prefabs = loadedPrefabs;
                AssetDatabase.Refresh();
                AssetDatabase.SaveAssets();
            }

            serializedObject.ApplyModifiedProperties();
        }