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. Dismiss Notice

Export Terrain Heightmap with C# script

Discussion in 'Scripting' started by jordiboni, Feb 10, 2015.

  1. jordiboni

    jordiboni

    Joined:
    Aug 14, 2013
    Posts:
    26
    How can I export a terrain heightmap to raw file using a C# script?
     
  2. toreau

    toreau

    Joined:
    Feb 8, 2014
    Posts:
    204
    Why do you need to export it with a script? Sounds like you want it to happen runtime, but the terrain's heightmap is static, so it doesn't make much sense...?
     
  3. jordiboni

    jordiboni

    Joined:
    Aug 14, 2013
    Posts:
    26
    I am working in a world tiled game. I am processing my tiles in a project and I want to generate an AssetBundle with all the heightmaps. In my runtime project, I will load tiles with a pager system and I want to import the .raw files in runtime. With this structure, I can different tiled DB with only one application and I don't need to rebuild my project.