Example #1
0
        public static ulong ComputeVariantHash(Type variantType, GhostComponentVariationAttribute attribute)
        {
            var hash = Entities.TypeHash.FNV1A64(attribute.GetType().FullName);
            var componentTypeName = attribute.ComponentType.FullName.Replace("+", "/");
            var variantName       = variantType.FullName.Replace("+", "/");

            hash = Entities.TypeHash.CombineFNV1A64(hash, Entities.TypeHash.FNV1A64(componentTypeName));
            hash = Entities.TypeHash.CombineFNV1A64(hash, Entities.TypeHash.FNV1A64(variantName));
            return(hash);
        }