Assets and Scenes
Prefabs
//pseudo code
public class test : MonoBehavior {
public GameObject gameobject;
void Update() {
destroy();//remember to destroy objects that you generated
if (spawn_condition) {
GameObject instance = Instantiate(gameobject) as GameObject;
//do something to instance
}
}
void destroy() {
foreach (GameObject ele in list_to_destroy) {
Destroy(ele);
}
list_to_destroy.clear();
}
}资源加载
活跃场景及名字
场景加载和进度条
数值文件的加载
数据存储方式
运行时数据可持久化
存档实现
资源的导出复用
Last updated