How do I run the code I find here?

Yes, my question is that basic. I’m trying to export some heightmaps using UnityHub, but it’s not working properly. I think I found something that would work here: Export Terrain Heightmap 2 PNG. However, I’m not sure where to run this code.

I’m in Linux Ubuntu Jammy Jelly (22.04)?

Other suggestions are welcome. What I need is this - I took an existing map and added adjacent terrains and modified it by adding hills. I need to export this new hill information, but the .raw files are coming out as garbage. Advice?

You don’t need to run the code yourself. It’s an Editow window. The [MenuItem("Window/Terrain to image")] attribute decorating the static method will add a new option under the ‘Window’ dropdown to open the window. You just need to fill out the fields and click the buttons.