private void Initialize()
        {
            if (m_mappings != null)
            {
                return;
            }

            m_mappings = new List <PersistentClassMapping>();

            PersistentClassMapping[] mappings = MappingsUtility.GetAllMappings();
            for (int i = 0; i < mappings.Length; ++i)
            {
                PersistentClassMapping classMapping = mappings[i];
                if (string.IsNullOrEmpty(classMapping.Version))
                {
                    classMapping.MappedTypeName         = MappingsUtility.FixTypeName(classMapping.MappedTypeName);
                    classMapping.PersistentTypeName     = MappingsUtility.FixTypeName(classMapping.PersistentTypeName);
                    classMapping.PersistentBaseTypeName = MappingsUtility.FixTypeName(classMapping.PersistentBaseTypeName);
                }

                if (classMapping.IsOn && Type.GetType(classMapping.MappedAssemblyQualifiedName) != null)
                {
                    m_mappings.Add(classMapping);
                }
            }

            m_mappings.Sort((m1, m2) => m1.MappedFullTypeName.CompareTo(m2.MappedFullTypeName));
            m_selection = new bool[m_mappings.Count];
            m_indices   = new int[m_mappings.Count];
            for (int i = 0; i < m_mappings.Count; ++i)
            {
                m_indices[i] = i;
            }
        }
        private void ApplyFilter()
        {
            List <int> indices = new List <int>();

            for (int i = 0; i < m_mappings.Count; ++i)
            {
                PersistentClassMapping mapping = m_mappings[i];

                if (string.IsNullOrWhiteSpace(m_filterText) || mapping.MappedFullTypeName.ToLower().Contains(m_filterText.ToLower()))
                {
                    indices.Add(i);
                }
            }
            m_indices = indices.ToArray();
        }
    //2.2 -> 2.2.1
    private static void UpdateMappedAssemblyNames2(string storagePath)
    {
        GameObject storageGO = (GameObject)AssetDatabase.LoadAssetAtPath(storagePath, typeof(GameObject));

        if (storageGO == null)
        {
            return;
        }

        if (!IsUpdateRequired(storageGO, 3))
        {
            return;
        }

        storageGO = Instantiate(storageGO);
        PersistentClassMappingsStorage storage = storageGO.GetComponent <PersistentClassMappingsStorage>();

        if (storage == null)
        {
            storage = storageGO.AddComponent <PersistentClassMappingsStorage>();
        }
        storage.Version      = RTSLVersion.Version.ToString();
        storage.PatchCounter = 3;

        PersistentClassMapping[] mappings = storageGO.GetComponentsInChildren <PersistentClassMapping>(true);
        for (int i = 0; i < mappings.Length; ++i)
        {
            PersistentClassMapping mapping = mappings[i];
            mapping.Version            = RTSLVersion.Version.ToString();
            mapping.MappedTypeName     = FixTypeName2(mapping.MappedTypeName);
            mapping.MappedAssemblyName = FixAssemblyName2(mapping.MappedAssemblyQualifiedName, mapping.MappedNamespace, mapping.MappedAssemblyName);

            PersistentPropertyMapping[] properties = mapping.PropertyMappings;
            for (int j = 0; j < properties.Length; ++j)
            {
                PersistentPropertyMapping property = properties[j];
                property.MappedTypeName     = FixTypeName2(property.MappedTypeName);
                property.MappedAssemblyName = FixAssemblyName2(property.MappedAssemblyQualifiedName, property.MappedNamespace, property.MappedAssemblyName);
            }
        }

        EditorUtility.SetDirty(storageGO);
        PrefabUtility.SaveAsPrefabAsset(storageGO, storagePath);
        DestroyImmediate(storageGO);
    }
    //2.05 -> 2.1
    private static void UpdateTags(string storagePath)
    {
        GameObject storageGO = (GameObject)AssetDatabase.LoadAssetAtPath(storagePath, typeof(GameObject));

        if (storageGO == null)
        {
            return;
        }

        if (!IsUpdateRequired(storageGO, 1))
        {
            return;
        }

        storageGO = Instantiate(storageGO);
        PersistentClassMappingsStorage storage = storageGO.GetComponent <PersistentClassMappingsStorage>();

        if (storage == null)
        {
            storage = storageGO.AddComponent <PersistentClassMappingsStorage>();
        }
        storage.Version      = new Version(2, 1).ToString();
        storage.PatchCounter = 1;

        PersistentClassMapping[] mappings = storageGO.GetComponentsInChildren <PersistentClassMapping>(true);
        for (int i = 0; i < mappings.Length; ++i)
        {
            PersistentClassMapping      mapping    = mappings[i];
            PersistentPropertyMapping[] properties = mapping.PropertyMappings;
            for (int j = 0; j < properties.Length; ++j)
            {
                PersistentPropertyMapping property = properties[j];
                property.PersistentTag        = j + 1;
                mapping.PersistentPropertyTag = j + 1;
            }
        }

        EditorUtility.SetDirty(storageGO);
        PrefabUtility.SaveAsPrefabAsset(storageGO, storagePath);
        DestroyImmediate(storageGO);
    }