public void ChangeFalloff(int id) { SelectedFalloff = id; LastRotation = BrushRotation.intValue; BrushGenerator.SetFallof(SelectedFalloff, LastRotation); TerrainMaterial.SetTexture("_BrushTex", (Texture)BrushGenerator.Current.RotatedBrush); //BrushGenerator.RegeneratePaintBrushIfNeeded(true); }
void SetBrush() { TerrainMaterial.SetInt("_Brush", 1); BrushGenerator.SetFallof(SelectedFalloff, LastRotation); TerrainMaterial.SetTexture("_BrushTex", (Texture)BrushGenerator.Current.Brushes[SelectedFalloff]); for (int i = 0; i < BrushTypes.Length; i++) { if (BrushTypes[i].isOn) { ChangeBrush(i); break; } } }
public void ChangeFalloff(int id) { if (!gameObject.activeSelf) { return; } SelectedFalloff = id; for (int i = 0; i < BrushToggles.Count; i++) { if (i == SelectedFalloff) { continue; } BrushToggles[i].isOn = false; } LastRotation = BrushRotation.intValue; BrushGenerator.SetFallof(SelectedFalloff, LastRotation); TerrainMaterial.SetTexture("_BrushTex", (Texture)BrushGenerator.Current.RotatedBrush); //BrushGenerator.RegeneratePaintBrushIfNeeded(true); }
void SetBrush() { TerrainMaterial.SetInt("_Brush", 1); BrushGenerator.SetFallof(SelectedFalloff, LastRotation); TerrainMaterial.SetTexture("_BrushTex", (Texture)BrushGenerator.Current.Brushes[SelectedFalloff]); }