public void bakeFoliageSurface(FoliageBakeSettings bakeSettings, FoliageTile foliageTile) { int num = (foliageTile.coord.y * FoliageSystem.TILE_SIZE_INT - this.coord.y * Landscape.TILE_SIZE_INT) / FoliageSystem.TILE_SIZE_INT * FoliageSystem.SPLATMAP_RESOLUTION_PER_TILE; int num2 = num + FoliageSystem.SPLATMAP_RESOLUTION_PER_TILE; int num3 = (foliageTile.coord.x * FoliageSystem.TILE_SIZE_INT - this.coord.x * Landscape.TILE_SIZE_INT) / FoliageSystem.TILE_SIZE_INT * FoliageSystem.SPLATMAP_RESOLUTION_PER_TILE; int num4 = num3 + FoliageSystem.SPLATMAP_RESOLUTION_PER_TILE; for (int i = num; i < num2; i++) { for (int j = num3; j < num4; j++) { SplatmapCoord splatmapCoord = new SplatmapCoord(i, j); float num5 = (float)this.coord.x * Landscape.TILE_SIZE + (float)splatmapCoord.y * Landscape.SPLATMAP_WORLD_UNIT; float num6 = (float)this.coord.y * Landscape.TILE_SIZE + (float)splatmapCoord.x * Landscape.SPLATMAP_WORLD_UNIT; Bounds bounds = default(Bounds); bounds.min = new Vector3(num5, 0f, num6); bounds.max = new Vector3(num5 + Landscape.SPLATMAP_WORLD_UNIT, 0f, num6 + Landscape.SPLATMAP_WORLD_UNIT); for (int k = 0; k < Landscape.SPLATMAP_LAYERS; k++) { float num7 = this.sourceSplatmap[i, j, k]; if (num7 >= 0.01f) { LandscapeMaterialAsset landscapeMaterialAsset = Assets.find <LandscapeMaterialAsset>(this.materials[k]); if (landscapeMaterialAsset != null) { FoliageInfoCollectionAsset foliageInfoCollectionAsset = Assets.find <FoliageInfoCollectionAsset>(landscapeMaterialAsset.foliage); if (foliageInfoCollectionAsset != null) { foliageInfoCollectionAsset.bakeFoliage(bakeSettings, this, bounds, num7); } } } } } } }
// Token: 0x06001121 RID: 4385 RVA: 0x00070744 File Offset: 0x0006EB44 protected virtual void handleBakeLocalButtonClicked(Sleek2ImageButton button) { FoliageBakeSettings bakeSettings = this.getBakeSettings(); FoliageSystem.bakeLocal(bakeSettings); }