Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Custom Terrain Editor UI

Discussion in 'World Building' started by DannyHellfish, Apr 23, 2021.

  1. DannyHellfish

    DannyHellfish

    Joined:
    Jan 20, 2014
    Posts:
    28
    Hello Unity Fellows,

    I am trying to write a custom Scene GUI for the Unity Terrain Editor as I'm not a big fan of the whole dropdown menu thing. So I actually wanted to start simply by selecting Paint Tools via scene view buttons.

    As far as I can tell TerrainToolShortcutContext.SelectPaintTool<>() is the only(?) function to do this but it doesn't work as all the basic terrain tool classes like SetHeightTool are protected (and I also don't really understand how to set ShortcutArguments by code)

    I also tried to circumvent the system by just triggering the shortcuts directly but it looks like I can neither trigger shortcut commands by code (or can I?) nor can I simulate key presses.

    So, what would be the correct way to approach this?

    Thank you for your time.





     
unityunity