public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); node.Add(NameName, Name); node.Add(PixelLightCountName, PixelLightCount); node.Add(ShadowsName, (int)Shadows); node.Add(ShadowResolutionName, (int)ShadowResolution); node.Add(ShadowProjectionName, (int)ShadowProjection); node.Add(ShadowCascadesName, (int)ShadowCascades); node.Add(ShadowDistanceName, ShadowDistance); node.Add(ShadowNearPlaneOffsetName, ShadowNearPlaneOffset); node.Add(ShadowCascade2SplitName, ShadowCascade2Split); node.Add(ShadowCascade4SplitName, ShadowCascade4Split.ExportYAML(container)); node.Add(ShadowmaskModeName, (int)ShadowmaskMode); node.Add(GetSkinWeightsName(container.ExportVersion), (int)SkinWeights); node.Add(TextureQualityName, (int)TextureQuality); node.Add(AnisotropicTexturesName, (int)AnisotropicTextures); node.Add(AntiAliasingName, (int)AntiAliasing); node.Add(SoftParticlesName, SoftParticles); node.Add(SoftVegetationName, SoftVegetation); node.Add(RealtimeReflectionProbesName, RealtimeReflectionProbes); node.Add(BillboardsFaceCameraPositionName, BillboardsFaceCameraPosition); node.Add(VSyncCountName, (int)VSyncCount); node.Add(LodBiasName, LodBias); node.Add(MaximumLODLevelName, MaximumLODLevel); if (HasStreamingMipmapsActive(container.ExportVersion)) { node.Add(StreamingMipmapsActiveName, StreamingMipmapsActive); node.Add(StreamingMipmapsAddAllCamerasName, GetStreamingMipmapsAddAllCameras(container.Version)); node.Add(StreamingMipmapsMemoryBudgetName, GetStreamingMipmapsMemoryBudget(container.Version)); node.Add(StreamingMipmapsRenderersPerFrameName, GetStreamingMipmapsRenderersPerFrame(container.Version)); node.Add(StreamingMipmapsMaxLevelReductionName, GetStreamingMipmapsMaxLevelReduction(container.Version)); node.Add(StreamingMipmapsMaxFileIORequestsName, GetStreamingMipmapsMaxFileIORequests(container.Version)); } node.Add(ParticleRaycastBudgetName, ParticleRaycastBudget); node.Add(AsyncUploadTimeSliceName, AsyncUploadTimeSlice); node.Add(AsyncUploadBufferSizeName, AsyncUploadBufferSize); if (HasAsyncUploadPersistentBuffer(container.ExportVersion)) { node.Add(AsyncUploadPersistentBufferName, AsyncUploadPersistentBuffer); } node.Add(ResolutionScalingFixedDPIFactorName, ResolutionScalingFixedDPIFactor); if (HasCustomRenderPipeline(container.ExportVersion)) { node.Add(CustomRenderPipelineName, CustomRenderPipeline.ExportYAML(container)); } node.Add(ExcludedTargetPlatformsName, GetExcludedTargetPlatforms(container.Version, container.Flags).ExportYAML()); return(node); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add("name", Name); node.Add("pixelLightCount", PixelLightCount); node.Add("shadows", (int)Shadows); node.Add("shadowResolution", (int)ShadowResolution); node.Add("shadowProjection", (int)ShadowProjection); node.Add("shadowCascades", (int)ShadowCascades); node.Add("shadowDistance", ShadowDistance); node.Add("shadowNearPlaneOffset", ShadowNearPlaneOffset); node.Add("shadowCascade2Split", ShadowCascade2Split); node.Add("shadowCascade4Split", ShadowCascade4Split.ExportYAML(container)); node.Add("shadowmaskMode", (int)ShadowmaskMode); node.Add("blendWeights", (int)BlendWeights); node.Add("textureQuality", (int)TextureQuality); node.Add("anisotropicTextures", (int)AnisotropicTextures); node.Add("antiAliasing", (int)AntiAliasing); node.Add("softParticles", SoftParticles); node.Add("softVegetation", SoftVegetation); node.Add("realtimeReflectionProbes", RealtimeReflectionProbes); node.Add("billboardsFaceCameraPosition", BillboardsFaceCameraPosition); node.Add("vSyncCount", (int)VSyncCount); node.Add("lodBias", LodBias); node.Add("maximumLODLevel", MaximumLODLevel); // 2018 //node.Add("streamingMipmapsActive", StreamingMipmapsActive); //node.Add("streamingMipmapsAddAllCameras", StreamingMipmapsAddAllCameras); //node.Add("streamingMipmapsMemoryBudget", StreamingMipmapsMemoryBudget); //node.Add("streamingMipmapsRenderersPerFrame", StreamingMipmapsRenderersPerFrame); //node.Add("streamingMipmapsMaxLevelReduction", StreamingMipmapsMaxLevelReduction); //node.Add("streamingMipmapsMaxFileIORequests", StreamingMipmapsMaxFileIORequests); node.Add("particleRaycastBudget", ParticleRaycastBudget); node.Add("asyncUploadTimeSlice", AsyncUploadTimeSlice); node.Add("asyncUploadBufferSize", AsyncUploadBufferSize); node.Add("resolutionScalingFixedDPIFactor", ResolutionScalingFixedDPIFactor); node.Add("excludedTargetPlatforms", GetExcludedTargetPlatforms(container.Version, container.Flags).ExportYAML()); return(node); }
public void Read(AssetReader reader) { if (HasName(reader.Version)) { Name = reader.ReadString(); } PixelLightCount = reader.ReadInt32(); if (HasShadows(reader.Version)) { Shadows = (ShadowQuality)reader.ReadInt32(); ShadowResolution = (ShadowResolution)reader.ReadInt32(); } if (HasShadowProjection(reader.Version)) { ShadowProjection = (ShadowProjection)reader.ReadInt32(); } if (HasShadowCascades(reader.Version)) { ShadowCascades = (ShadowCascades)reader.ReadInt32(); ShadowDistance = reader.ReadSingle(); } if (HasShadowNearPlaneOffset(reader.Version)) { ShadowNearPlaneOffset = reader.ReadSingle(); } if (HasShadowCascade2Split(reader.Version)) { ShadowCascade2Split = reader.ReadSingle(); ShadowCascade4Split.Read(reader); } if (HasShadowmaskMode(reader.Version)) { ShadowmaskMode = (ShadowmaskMode)reader.ReadInt32(); } SkinWeights = (SkinWeights)reader.ReadInt32(); TextureQuality = (TextureQuality)reader.ReadInt32(); AnisotropicTextures = (AnisotropicFiltering)reader.ReadInt32(); AntiAliasing = (AntiAliasing)reader.ReadInt32(); if (HasSoftParticles(reader.Version)) { SoftParticles = reader.ReadBoolean(); } if (HasSoftVegetation(reader.Version)) { SoftVegetation = reader.ReadBoolean(); } if (HasRealtimeReflectionProbes(reader.Version)) { RealtimeReflectionProbes = reader.ReadBoolean(); } if (HasBillboardsFaceCameraPosition(reader.Version)) { BillboardsFaceCameraPosition = reader.ReadBoolean(); } if (HasSyncToVBL(reader.Version)) { SyncToVBL = reader.ReadBoolean(); } if (IsAlign(reader.Version)) { reader.AlignStream(); } if (HasVSyncCount(reader.Version)) { VSyncCount = (VSyncCount)reader.ReadInt32(); } if (HasLodBias(reader.Version)) { LodBias = reader.ReadSingle(); MaximumLODLevel = reader.ReadInt32(); } if (HasStreamingMipmapsActive(reader.Version)) { StreamingMipmapsActive = reader.ReadBoolean(); StreamingMipmapsAddAllCameras = reader.ReadBoolean(); reader.AlignStream(); StreamingMipmapsMemoryBudget = reader.ReadSingle(); StreamingMipmapsRenderersPerFrame = reader.ReadInt32(); StreamingMipmapsMaxLevelReduction = reader.ReadInt32(); StreamingMipmapsMaxFileIORequests = reader.ReadInt32(); } if (HasParticleRaycastBudget(reader.Version)) { ParticleRaycastBudget = reader.ReadInt32(); } if (HasAsyncUploadTimeSlice(reader.Version)) { AsyncUploadTimeSlice = reader.ReadInt32(); AsyncUploadBufferSize = reader.ReadInt32(); } if (HasAsyncUploadPersistentBuffer(reader.Version)) { AsyncUploadPersistentBuffer = reader.ReadBoolean(); reader.AlignStream(); } if (HasResolutionScalingFixedDPIFactor(reader.Version)) { ResolutionScalingFixedDPIFactor = reader.ReadSingle(); } if (HasCustomRenderPipeline(reader.Version)) { CustomRenderPipeline.Read(reader); } if (HasVSyncCount(reader.Version)) { reader.AlignStream(); } #if UNIVERSAL if (HasExcludedTargetPlatforms(reader.Version, reader.Flags)) { ExcludedTargetPlatforms = reader.ReadStringArray(); } #endif }