private void Buttons()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Select All", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                for (int i = 0; i < m_indices.Length; ++i)
                {
                    m_selection[m_indices[i]] = true;
                }
            }
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Unselect All", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                for (int i = 0; i < m_indices.Length; ++i)
                {
                    m_selection[m_indices[i]] = false;
                }
            }
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Export", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                string path = EditorUtility.SaveFilePanel("Export Mappings", "", "Mappings", "txt");
                if (!string.IsNullOrEmpty(path))
                {
                    Debug.Log("Export to " + path);

                    List <PersistentClassMapping> classMappings     = new List <PersistentClassMapping>();
                    List <PersistentClassMapping> surrogateMappings = new List <PersistentClassMapping>();
                    for (int i = 0; i < m_selection.Length; ++i)
                    {
                        if (m_selection[i])
                        {
                            if (typeof(UnityEngine.Object).IsAssignableFrom(Type.GetType(m_mappings[i].MappedAssemblyQualifiedName)))
                            {
                                classMappings.Add(m_mappings[i]);
                            }
                            else
                            {
                                surrogateMappings.Add(m_mappings[i]);
                            }
                        }
                    }

                    MappingsUtility.Export(path, classMappings.ToArray(), surrogateMappings.ToArray());
                }
            }

            EditorGUILayout.EndHorizontal();
        }
        private void Buttons()
        {
            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Select All", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                for (int i = 0; i < m_indices.Length; ++i)
                {
                    m_selection[m_indices[i]] = true;
                }
            }
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Unselect All", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                for (int i = 0; i < m_indices.Length; ++i)
                {
                    m_selection[m_indices[i]] = false;
                }
            }
            EditorGUI.BeginChangeCheck();
            GUILayout.Button("Export", GUILayout.Height(20));
            if (EditorGUI.EndChangeCheck())
            {
                string packagePath = EditorUtility.SaveFilePanel("Export Mappings", "", "Mappings", "unitypackage");
                if (!string.IsNullOrEmpty(packagePath))
                {
                    Debug.Log("Export to " + packagePath);

                    List <PersistentClassMapping> classMappings     = new List <PersistentClassMapping>();
                    List <PersistentClassMapping> surrogateMappings = new List <PersistentClassMapping>();
                    for (int i = 0; i < m_selection.Length; ++i)
                    {
                        if (m_selection[i])
                        {
                            if (typeof(UnityEngine.Object).IsAssignableFrom(Type.GetType(m_mappings[i].MappedAssemblyQualifiedName)))
                            {
                                classMappings.Add(m_mappings[i]);
                            }
                            else
                            {
                                surrogateMappings.Add(m_mappings[i]);
                            }
                        }
                    }

                    string mappingsPath = Application.dataPath + "/Mappings.txt";
                    MappingsUtility.Export(mappingsPath, classMappings.ToArray(), surrogateMappings.ToArray());
                    AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);

                    m_assetsPath.Add("Assets/Mappings.txt");

                    AssetDatabase.ExportPackage(m_assetsPath.ToArray(), packagePath, ExportPackageOptions.Default);
                    AssetDatabase.DeleteAsset("Assets/Mappings.txt");

                    m_dropAreaText = string.Empty;
                    m_assetsPath.Clear();
                }
            }

            EditorGUILayout.EndHorizontal();
        }