[Unity] 存檔系統 Part 2 | JSON | Unity初學者系列教程 | 數據存取 | 數據持久化 | 存檔讀檔 | Save&Load
在本影片中你將學到Unity引擎中三種常見的數據存儲方式中的第二種:JSON
主要內容:
1. 什麽是JSON
2. 了解Unity引擎的JsonUtility
3. 構建JSON存檔系統
4. JSON的優缺點和適用範圍
本影片是Unity存檔系統系列教程的第二部分。
––––––––––––––––––––––––––––––
教程GitHub倉庫 -
https://github.com/AtCloudStudio/SaveSystemTutorial
––––––––––––––––––––––––––––––
Unity 存檔系統 Part 1 - PlayerPrefs: https://youtu.be/tci13zedrzw
Unity 存檔系統 Part 2 - JSON: https://youtu.be/1vOuh3_ZXRQ
—————————————————————————
希望對大家的遊戲開發之路有所幫助 :)
💬有任何問題請在評論中留言,我會盡力回答。
––––––––––––––––––––––––––––––
你好啊!我是阿嚴,一個小小的獨立遊戲開發者與自由藝術家。
我每周都會更新獨立遊戲開發教程與日誌。
如果你覺得我的視頻還不錯,請幫我點贊並訂閱我的頻道,謝謝 :)
––––––––––––––––––––––––––––––
➤訂閱我的頻道 - https://www.youtube.com/channel/UCSRCf2y6LV8vpKSoXDoU2VQ?sub_confirmation=1
➤Discord Server - https://discord.gg/ZmTgSCe4Jq
➤Twitter - https://twitter.com/XuZuyan
➤ArtStation - https://www.artstation.com/xuzuyan
––––––––––––––––––––––––––––––
參考資料鏈接:
JSON - https://www.json.org/
JSON(中文) - https://www.json.org/json-zh.html
JSON Example - https://json.org/example.html
JsonUtility.ToJson - Unity Documentation - Scripting API -
https://docs.unity3d.com/ScriptReference/JsonUtility.ToJson.html
JsonUtility.FromJson - Unity Documentation - Scripting API -
https://docs.unity3d.com/ScriptReference/JsonUtility.FromJson.html
JsonUtility.FromJsonOverwrite - Unity Documentation - Scripting API -
https://docs.unity3d.com/ScriptReference/JsonUtility.FromJsonOverwrite.html
Script Serialization - Unity Documentation - Manual -
https://docs.unity3d.com/Manual/script-Serialization.html
Application.persistentDataPath - Unity Documentation - Scripting API -
https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
Path.Combine - Microsoft .NET Docs -
https://docs.microsoft.com/en-us/dotnet/api/system.io.path.combine
File.WriteAllText - Microsoft .NET Docs -
https://docs.microsoft.com/en-us/dotnet/api/system.io.file.writealltext
File.ReadAllText - Microsoft .NET Docs -
https://docs.microsoft.com/en-us/dotnet/api/system.io.file.readalltext
File.Delete - Microsoft .NET Docs -
https://docs.microsoft.com/en-us/dotnet/api/system.io.file.delete
try-catch - Microsoft .NET Docs -
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/try-catch
––––––––––––––––––––––––––––––
00:00 視頻簡介
01:15 什麽是JSON
02:34 JsonUtility
15:22 構建JSON存檔系統
29:41 JSON存檔系統的優缺點
30:59 JSON存檔系統的適用範圍
31:37 總結
32:16 尾聲
––––––––––––––––––––––––––––––
#unity
unity教程
unity中文教程
遊戲開發
獨立遊戲
獨立遊戲開發
#JSON
數據持久化
#存檔系統
存檔與讀檔
數據存取