Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Bug Terrain Brush Functionality is Disabled

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

  1. Mortalanimal

    Mortalanimal

    Joined:
    Jun 7, 2014
    Posts:
    465
    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)

    Fix:
    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();
    4.      
    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

    Mortalanimal

    Joined:
    Jun 7, 2014
    Posts:
    465
    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
     
unityunity