unity的prefabs

Prefabs in Unity are for the time being just an Unity editor feature. Prefabs are predefined assets which can only be created in the editor. Prefabs doesn't even exist in your build. A prefab at runtime is just an off-scene gameobject. It is loaded like any other asset and can be used as clone (Instantiate) source.

Unity has no inbuild functions to save any kind of gamestate. This has to be implemented by yourself. I guess there are third party frameworks out there for Unity which allows some kind of saving and loading.

If you don't have the money to buy such a package you can still do it yourself. It's up to you how you save the data. Very common is using some kind of xml structure to save everything (Mesh data, object parameters, name, position / rotation / scale, components, ...) in a text format. For images it's best to use png files.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值