public static CacheEntry GetCacheEntry(Type type, int version = 1)
    {
        CacheEntry entry;
        KeyValuePair <string, int> key = new KeyValuePair <string, int>(type.AssemblyQualifiedName, version);

        if (m_TypeToHash.TryGetValue(key, out entry))
        {
            return(entry);
        }

        entry = new CacheEntry {
            ScriptType = type.AssemblyQualifiedName, Version = version
        };
        entry.Guid = HashingMethods.Calculate("TypeHash", entry.ScriptType).ToGUID();
#if ENABLE_TYPE_HASHING
        entry.Hash = ContentBuildInterface.CalculatePlayerSerializationHashForType(type, m_TypeDB);
#else
        entry.Hash = m_TypeDB != null?m_TypeDB.GetHash128() : m_UnityVersion;
#endif
        entry.Type = CacheEntry.EntryType.ScriptType;

        m_PathToHash[key] = entry;
        return(entry);
    }