- Home /
Question by
Yanger_xy · Mar 17, 2012 at 08:27 AM ·
assetbundlesaveterrain data
How to save terrain data generated at runtime permanently
Hello everyone.
I generate a lot of terrain at runtime from DEM, and i wanna to save them permanently, how can i realize it? Use AssetBundle or ?
Comment
Answer by bertvdb · Mar 17, 2012 at 01:41 PM
If you want to save the place of the object you can save them really easy. But the position of the object must be in a variable, next you need to use this code:
// Save prefab.
PlayerPrefs.SetInt("var int name", var int name);
// load prefab in debug.log.
Debug.Log(PlayerPrefs.GetInt("var int name"));
//use this to set it to the saved pos.
var int name = PlayerPrefs.GetInt("var int name");
See more here.
I to read some thing about prefab saving: here
Your answer

Follow this Question
Related Questions
How to import the object from server to unity 2 Answers
Write Downloaded AssetBundle to Local Storage 4 Answers
AssetBundle Save Dir 0 Answers
save gameObject to assetBundle 1 Answer
Lag issue when using assetbundles 1 Answer