- Home /
2D Terrain Generation and Storage of Data
Hi, I want to create a 2D terrain generator for my own game. I know the general idea. How should I store Vectors(vertices) of mesh? When I was doing this in another platform, I used to create a serializable file for them and read at the beginning of level. Then I was activating physics bodies and meshes part by part in respect of my car's position, for performance issues. For now all I can do is to enter vertices in script by hand :) I don't know how to predefine, and display in scene before runtime. Thanks
Answer by Statement · Dec 21, 2013 at 11:39 PM
You could just create a new Mesh instance and save it as an asset using AssetDatabase.CreateAsset. If you don't want to be working directly with Meshes, you can consider using ScriptableObject (together with AssetDatabase.CreateAsset)
Answer by stuart6854 · Dec 21, 2013 at 11:21 PM
If your wanting 2D Voxel Generation, look at these tutorials:
[http://studentgamedev.blogspot.co.uk/search/label/Voxels][1]
Your answer
![](https://koobas.hobune.stream/wayback/20220613124637im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Thread ending prematurely? 2 Answers
Procedural Generation 2 Answers
Can I get help making a procedural planet generator 0 Answers
Format of .fontsettings file 1 Answer