Search Unity

Terrain Serializer

Discussion in 'Assets and Asset Store' started by noanoa, Sep 16, 2017.

  1. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Terrain Serializer is a lightweight script that lets you Save/Load Unity's Terrain at runtime.

    You can use it to save few hours of work/ headache, or to learn how to serialize and interact with terrain data. The codes are kept simple and can be easily modified/extended/integrated.

    Documentation

    Features

    * Save/Load Tree Instances
    * Save/Load HeightMap
    * Save/Load AlphaMap
    * Save/Load DetailMap
    * Save/Load Terrain (All the maps/tree data)
    * Serialize/Deserialize at both runtime/editor
    * Source code included

    Limitation

    Terrain Serializer does not serialize meshes(tree etc), textures(grounds etc) etc. That means, for example, if sand ground texture is replaced by mud texture on the terrain editor, mud will appear in place of sand when the terrain is deserialized.

    Terrain Serializer does not create new Terrain. It applies serialized data(maps, trees and detail positions,size, etc) to the existing terrain.

    It can completely restore a terrain given that the terrain has the same set of brushes(trees, details etc)

    Example Usage

    To serialize Terrain, call
    TerrainSerializer.Save( filePath, terrain );

    To deserialize Terrain, call
    TerrainSerializer.Load( filePath, terrain);

    Each map/tree data can be individually serialized/deserialized if desired. For more methods and information, please refer to the documentation.

    Support

    Please feel free to ask questions or request new features.

    Tested and works on Unity 5.3 and 2017
     
  2. digitaljokerman

    digitaljokerman

    Joined:
    Dec 31, 2017
    Posts:
    4
    Download link?
     
  3. T-Zee

    T-Zee

    Joined:
    Oct 23, 2017
    Posts:
    31
  4. Dewald_Bodenstein

    Dewald_Bodenstein

    Joined:
    Feb 27, 2014
    Posts:
    6
    This is quite old, still relevant?

    I would definitely like to know what size the serialized file comes out to?

    Say for instance you had a height map of 4097x4097 and you are only saving the height map, what size are you getting?