- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
 
- 纳金币
- -1
- 精华
- 11
|
(1)
Also added to the wiki but not as a package, just the scripts to get this done, basically this simply walks all gameobjects in the scene and saves information about them to the XML file, you can expand what is saved through the SaveS***cture class file, then populate it via the _GameSaveLoad class
Output example in the XML
复制内容到剪贴板代码:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfGameItems xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GameItems>
<ID>ScriptManager_-1370</ID>
<Name>ScriptManager</Name>
<posx>0</posx>
<posy>1</posy>
<posz>-10</posz>
</GameItems>
<GameItems>
<ID>Main Camera_-474</ID>
<Name>Main Camera</Name>
<posx>0</posx>
<posy>1</posy>
<posz>-10</posz>
</GameItems>
</ArrayOfGameItems>(2)
Expanded example, this version not only saves / loads the object to XML, but also now allows you to apply the saved settings back into the scene. The code is really self explanatory.
http://screencast.com/t/ZGYwYzI0Y2M
(3)
FYI you can simply drag the SQLITECLASS to the scriptmanager object and then the sqlite code will have buttons to use for saving and loading to sqlite.
See video:
http://screencast.com/t/aFpF3j59 |
|