public void Regenerate() { Debug.Log("[REGENERATE] " + gameObject.transform.parent.name); PlanetGenerationData PGDDatas = new PlanetGenerationData() { PGDMapSize = profile.TexturesSize, PGDProfile = this.profile, PGDCallback = (Texture2D GeneratedTex) => { ColorMap = new Texture2D( profile.TexturesSize, (int)(profile.TexturesSize / 2f)); ColorMap.SetPixels(GeneratedTex.GetPixels()); ColorMap.Apply(); SetGroundActive(profile.UseGround); if (profile.UseGround) { ReScale(); SetGroundMaterialValues(); } HandleWater(); HandleClouds(); HandleAura(); } }; CustomPerlinGenerator.Instance.Generate(PGDDatas); }
public void Generate(PlanetGenerationData datas) { mapSize = datas.PGDMapSize; colorGrad = datas.PGDProfile.ColorGradient; Generate(datas.PGDProfile); // End datas.PGDCallback(ColorMap); }