private void Start() { mc = GetComponent <GPUMarchingCubes>(); densityTexture = new Texture3D(BBoxResolution, BBoxResolution, BBoxResolution, TextureFormat.RFloat, false); densityTexture.wrapMode = TextureWrapMode.Clamp; colors = new Color[BBoxResolution * BBoxResolution * BBoxResolution]; for (int i = 0; i < colors.Length; i++) { colors[i] = Color.white; } GenerateSoil(); }
protected override void Initialize() { base.Initialize(); march = GetComponentInChildren <GPUMarchingCubes>(); }