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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Can't assign custom Material to Terrain anymore

Discussion in 'General Graphics' started by ProBaller3000, Apr 13, 2023.

  1. ProBaller3000

    ProBaller3000

    Joined:
    Nov 9, 2022
    Posts:
    2
    I'm currently working on a custom Terrain shader and got it working. Now I tried to expand my Terrain but ran into a problem when creating new Terrain and assigning my custom material to it. The terrain won't render at all and I get the following error:

    Instancing: Unhandled property 'unity_ObjectToWorldArray'. Values are undefined.
    UnityEngine.GUIUtility: ProcessEvent (int,intptr,bool&)

    At the same time I have my "working" Terrain with the same Material Assigned to it, which renders perfectly fine in the same Scene.

    Even started a whole new project reproducing the error in a simpler way: Create new terrain -> assign any default material to it (other than default terrain materials) -> same problem and same error message.

    Has anyone else had that problem? It drives me crazy and can't figure out what the problem is. Plus I'm 100% sure that assigning any standard material, even if it is not a unity terrain material, worked before Yesterday. I didn't change anything in my Terrain Tools Package or Unity Version in the meantime.

    Currently using:
    Terrain Tools Version 4.0.5 - February 13, 2023
    Unity 2021.3.12f1
    Built - in 3D template Render Pipeline
     
    Last edited: Apr 13, 2023
  2. ProBaller3000

    ProBaller3000

    Joined:
    Nov 9, 2022
    Posts:
    2
    Found the difference myself: When I create the new terrain with the terrain toolbox, the custom terrain shader messes up the whole scene and doesn't work at all. But if I create the terrain in hirarchy - via right click - create terrain, everything works fine.