Saving texture as raw

Hi, I wanted to capture the screenshot of a camera and then use it as a terrain’s heightmap. I wanted to ask how can I do it and if there are any ways to save it in raw to be able to use it as terrain’s heightmap.

Thanks

You can use Texture2D.GetPixels to get the color data into an array. You’ll need to convert that into an array of floats, then use TerrainData.SetHeights to use it as a heightmap.