public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(CodeName, Code); node.Add(AssetPathName, AssetPath); node.Add(PlatformMaskName, PlatformMask); node.Add(HardwareTierVariantsMaskName, HardwareTierVariantsMask); node.Add(StartLineName, StartLine); node.Add(TypesMaskName, TypesMask); node.Add(IncludesHashName, IncludesHash.ExportYAML(container)); node.Add(CodeHashName, CodeHash.ExportYAML(container)); node.Add(FromOtherName, FromOther); node.Add(LanguageName, Language); node.Add(VariantsUser0Name, GetVariantsUser0(container.Version).ExportYAML()); node.Add(VariantsUser1Name, GetVariantsUser1(container.Version).ExportYAML()); node.Add(VariantsUser2Name, GetVariantsUser2(container.Version).ExportYAML()); node.Add(VariantsUser3Name, GetVariantsUser3(container.Version).ExportYAML()); node.Add(VariantsUser4Name, GetVariantsUser4(container.Version).ExportYAML()); node.Add(VariantsUser5Name, GetVariantsUser5(container.Version).ExportYAML()); node.Add(VariantsBuiltin0Name, GetVariantsBuiltin0(container.Version).ExportYAML()); node.Add(VariantsBuiltin1Name, GetVariantsBuiltin1(container.Version).ExportYAML()); node.Add(VariantsBuiltin2Name, GetVariantsBuiltin2(container.Version).ExportYAML()); node.Add(VariantsBuiltin3Name, GetVariantsBuiltin3(container.Version).ExportYAML()); node.Add(VariantsBuiltin4Name, GetVariantsBuiltin4(container.Version).ExportYAML()); node.Add(VariantsBuiltin5Name, GetVariantsBuiltin5(container.Version).ExportYAML()); node.Add(BaseRequirementsName, GetBaseRequirements(container.Version)); node.Add(KeywordTargetInfoName, GetKeywordTargetInfo(container.Version).ExportYAML(container)); node.Add(NonStrippedUserKeywordsName, GetNonStrippedUserKeywords(container.Version)); node.Add(BuiltinKeywordsName, GetBuiltinKeywords(container.Version)); return(node); }
public void Read(AssetReader reader) { Code = reader.ReadString(); AssetPath = reader.ReadString(); PlatformMask = reader.ReadUInt32(); if (IsReadHardwareTierVariantsMask(reader.Version)) { HardwareTierVariantsMask = reader.ReadUInt32(); } if (IsReadStartLine(reader.Version)) { StartLine = reader.ReadInt32(); } TypesMask = reader.ReadUInt32(); IncludesHash.Read(reader); if (IsReadCodeHash(reader.Version)) { CodeHash.Read(reader); } if (IsReadTarget(reader.Version)) { if (IsReadTargetFirst(reader.Version)) { Target = reader.ReadInt32(); } } if (IsReadIsGLSL(reader.Version)) { bool IsGLSL = reader.ReadBoolean(); Language = IsGLSL ? 1 : 0; } FromOther = reader.ReadBoolean(); if (IsReadForceSyncCompilation(reader.Version)) { ForceSyncCompilation = reader.ReadBoolean(); } reader.AlignStream(AlignType.Align4); if (IsReadLanguage(reader.Version)) { Language = reader.ReadInt32(); } if (IsReadKeywordCombinations(reader.Version)) { m_keywordCombinations0 = reader.ReadStringArrayArray(); m_keywordCombinations1 = reader.ReadStringArrayArray(); m_keywordCombinations2 = reader.ReadStringArrayArray(); m_keywordCombinations3 = reader.ReadStringArrayArray(); m_keywordCombinations4 = reader.ReadStringArrayArray(); m_keywordCombinations5 = reader.ReadStringArrayArray(); } else { m_variantsUserGlobal0 = reader.ReadStringArrayArray(); m_variantsUserGlobal1 = reader.ReadStringArrayArray(); m_variantsUserGlobal2 = reader.ReadStringArrayArray(); m_variantsUserGlobal3 = reader.ReadStringArrayArray(); m_variantsUserGlobal4 = reader.ReadStringArrayArray(); m_variantsUserGlobal5 = reader.ReadStringArrayArray(); if (IsReadVariantsUserLocal(reader.Version)) { m_variantsUserLocal0 = reader.ReadStringArrayArray(); m_variantsUserLocal1 = reader.ReadStringArrayArray(); m_variantsUserLocal2 = reader.ReadStringArrayArray(); m_variantsUserLocal3 = reader.ReadStringArrayArray(); m_variantsUserLocal4 = reader.ReadStringArrayArray(); m_variantsUserLocal5 = reader.ReadStringArrayArray(); } m_variantsBuiltin0 = reader.ReadStringArrayArray(); m_variantsBuiltin1 = reader.ReadStringArrayArray(); m_variantsBuiltin2 = reader.ReadStringArrayArray(); m_variantsBuiltin3 = reader.ReadStringArrayArray(); m_variantsBuiltin4 = reader.ReadStringArrayArray(); m_variantsBuiltin5 = reader.ReadStringArrayArray(); } if (IsReadTarget(reader.Version)) { if (!IsReadTargetFirst(reader.Version)) { Target = reader.ReadInt32(); } } if (IsReadTargetVariants(reader.Version)) { m_targetVariants0 = reader.ReadStringArrayArray(); m_targetVariants1 = reader.ReadStringArrayArray(); m_targetVariants2 = reader.ReadStringArrayArray(); m_targetVariants3 = reader.ReadStringArrayArray(); m_targetVariants4 = reader.ReadStringArrayArray(); m_targetVariants5 = reader.ReadStringArrayArray(); } if (IsReadBaseRequirements(reader.Version)) { BaseRequirements = reader.ReadInt32(); m_keywordTargetInfo = reader.ReadAssetArray <KeywordTargetInfo>(); } if (IsReadNonStrippedUserKeywords(reader.Version)) { NonStrippedUserKeywords = reader.ReadString(); BuiltinKeywords = reader.ReadString(); } }