Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Terrain Brush Functionality is Disabled

Discussion in 'World Building' started by Mortalanimal, May 25, 2021.

  1. Mortalanimal


    Jun 7, 2014
    So, I am not sure what causes this to happen, I am able to click on and select what I would like to paint, weather its a tree/detail/grass etc.. and I see the Gizmo range circle on the terrain, but When I click I dont draw anything.

    What causes this to happen:
    1) randomly (low chance)
    2) after adding prefabs (trees etc, to the terrain tool) (10-20% chance)

    Reset unity (works 100%)
    Make any amendment to any Script, even if its just adding a comment (50% chance to fix)

    Things I tired and failed:

    Code (CSharp):
    1.  public void flush()
    2.     {
    3.         References();
    5.         terrainRef.terrainData.RefreshPrototypes();
    6.         terrainRef.Flush();
    7.         UnityEditor.EditorUtility.SetDirty(this);
    8.        // UnityEditor.TerrainLayerInspector.
    9.         UnityEditor.EditorUtility.RequestScriptReload();
    10.         UnityEditor.AssetDatabase.Refresh();
    11.         UnityEditor.EditorApplication.update();
    12.     }
  2. Mortalanimal


    Jun 7, 2014
    Found a temp Fix (Unlock and relock the Inspector that contains the terrain script)..

    Locking it seems to be causing the issue, this is pretty annoying considering how important it is to lock the Inspector while working with the terrain tool