public void Read(AssetReader reader) { m_patches = reader.ReadAssetArray <DetailPatch>(); m_detailPrototypes = reader.ReadAssetArray <DetailPrototype>(); PatchCount = reader.ReadInt32(); PatchSamples = reader.ReadInt32(); m_randomRotations = reader.ReadAssetArray <Vector3f>(); if (IsReadAtlasTexture(reader.Version)) { AtlasTexture.Read(reader); } WavingGrassTint.Read(reader); WavingGrassStrength = reader.ReadSingle(); WavingGrassAmount = reader.ReadSingle(); WavingGrassSpeed = reader.ReadSingle(); if (IsReadDetailBillboardShader(reader.Version)) { DetailBillboardShader.Read(reader); DetailMeshLitShader.Read(reader); DetailMeshGrassShader.Read(reader); } m_treeInstances = reader.ReadAssetArray <TreeInstance>(); m_treePrototypes = reader.ReadAssetArray <TreePrototype>(); if (IsReadPreloadTextureAtlasData(reader.Version)) { m_preloadTextureAtlasData = reader.ReadAssetArray <PPtr <Texture2D> >(); } }
public void Read(AssetReader reader) { Patches = reader.ReadAssetArray <DetailPatch>(); DetailPrototypes = reader.ReadAssetArray <DetailPrototype>(); PatchCount = reader.ReadInt32(); PatchSamples = reader.ReadInt32(); RandomRotations = reader.ReadAssetArray <Vector3f>(); if (HasAtlasTexture(reader.Version)) { AtlasTexture.Read(reader); } WavingGrassTint.Read(reader); WavingGrassStrength = reader.ReadSingle(); WavingGrassAmount = reader.ReadSingle(); WavingGrassSpeed = reader.ReadSingle(); if (HasDetailBillboardShader(reader.Version)) { DetailBillboardShader.Read(reader); DetailMeshLitShader.Read(reader); DetailMeshGrassShader.Read(reader); } TreeDatabase.Read(reader); if (!HasAtlasTexture(reader.Version)) { PreloadTextureAtlasData = reader.ReadAssetArray <PPtr <Texture2D> >(); } }