From d952a7924dbcced9dc546324e0a35e7ad53ef04c Mon Sep 17 00:00:00 2001 From: Dan Birman Date: Fri, 23 Aug 2024 15:20:29 -0700 Subject: [PATCH] feat: adding a load function directly from a string (for internal calls, e.g. PlayerPrefs) --- .../Packages/vbl.urchin/Scripts/Managers/DataManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UnityClient/Packages/vbl.urchin/Scripts/Managers/DataManager.cs b/UnityClient/Packages/vbl.urchin/Scripts/Managers/DataManager.cs index 30b7aadd..c380b90a 100644 --- a/UnityClient/Packages/vbl.urchin/Scripts/Managers/DataManager.cs +++ b/UnityClient/Packages/vbl.urchin/Scripts/Managers/DataManager.cs @@ -156,6 +156,15 @@ public void Load(LoadModel allData) ParseLoadData(allData); } + /// + /// Load data from an internal serialized string + /// + /// + public void Load(string serializedData) + { + ParseLoadData(JsonUtility.FromJson(serializedData)); + } + /// /// Load all of the managers in priority order ///