Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit af8d865

Browse files
committed
fix: json serialization with typename handling all
1 parent 54ad94c commit af8d865

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

Packages/com.nuclearband.sodatabase/Runtime/SODatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Linq;
66
using System.Threading.Tasks;
77
using Newtonsoft.Json;
8-
using Sirenix.Utilities;
98
using UnityEngine;
109
using UnityEngine.AddressableAssets;
1110

@@ -22,8 +21,9 @@ public static class SODatabase
2221
private static JsonSerializerSettings jsonSerializerSettings => new JsonSerializerSettings
2322
{
2423
Formatting = Formatting.Indented,
24+
TypeNameHandling = TypeNameHandling.All,
2525
ReferenceResolverProvider = () => new DataNodeReferenceResolver(),
26-
ObjectCreationHandling = ObjectCreationHandling.Replace
26+
ObjectCreationHandling = ObjectCreationHandling.Replace,
2727
};
2828

2929
private static JsonSerializerSettings jsonRuntimeSerializerSettings => new JsonSerializerSettings

Packages/com.nuclearband.sodatabase/Runtime/SODatabaseSettings.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
using System;
33
using Sirenix.OdinInspector;
44
using UnityEngine;
5-
#if UNITY_EDITOR
5+
#if UNITY_EDITOR
66
using UnityEditor;
7-
87
#endif
98

109
namespace NuclearBand
1110
{
1211
public class SODatabaseSettings : SerializedScriptableObject
1312
{
1413
private static SODatabaseSettings instance = null!;
14+
1515
public static SODatabaseSettings Instance
1616
{
1717
get
1818
{
1919
if (instance == null)
2020
instance = Resources.Load<SODatabaseSettings>("SODatabaseSettings");
21-
#if UNITY_EDITOR
21+
#if UNITY_EDITOR
2222
if (instance == null)
2323
{
2424
AssetDatabase.Refresh();
@@ -29,14 +29,14 @@ public static SODatabaseSettings Instance
2929
AssetDatabase.CreateAsset(instance, (destination + "SODatabaseSettings.asset"));
3030
AssetDatabase.SaveAssets();
3131
}
32-
#endif
32+
#endif
3333
return instance;
3434
}
3535
}
3636

3737
public static string Path => Instance.path;
3838
public static string Label => Instance.label;
39-
39+
4040
[SerializeField]
4141
[ReadOnly]
4242
[Title("Don't forget to set this folder as Addressable with label")]
@@ -51,11 +51,11 @@ public static SODatabaseSettings Instance
5151
[FolderPath(AbsolutePath = false)]
5252
[NonSerialized, ShowInInspector]
5353
public string SavePath = string.Empty;
54-
54+
5555
[Button]
5656
void Save()
5757
{
5858
path = SavePath + "/";
5959
}
6060
}
61-
}
61+
}

Packages/manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"com.unity.2d.sprite": "1.0.0",
44
"com.unity.addressables": "1.14.2",
55
"com.unity.ide.rider": "2.0.7",
6-
"com.unity.ide.visualstudio": "2.0.2",
7-
"com.unity.ide.vscode": "1.2.1",
6+
"com.unity.ide.visualstudio": "2.0.3",
7+
"com.unity.ide.vscode": "1.2.3",
88
"com.unity.nuget.newtonsoft-json": "2.0.0",
9-
"com.unity.test-framework": "1.1.16",
10-
"com.unity.textmeshpro": "3.0.1",
11-
"com.unity.timeline": "1.4.2",
9+
"com.unity.test-framework": "1.1.18",
10+
"com.unity.textmeshpro": "3.0.3",
11+
"com.unity.timeline": "1.4.4",
1212
"com.unity.ugui": "1.0.0",
1313
"com.unity.modules.ai": "1.0.0",
1414
"com.unity.modules.androidjni": "1.0.0",

Packages/packages-lock.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
"url": "https://packages.unity.com"
4545
},
4646
"com.unity.ide.visualstudio": {
47-
"version": "2.0.2",
47+
"version": "2.0.3",
4848
"depth": 0,
4949
"source": "registry",
5050
"dependencies": {},
5151
"url": "https://packages.unity.com"
5252
},
5353
"com.unity.ide.vscode": {
54-
"version": "1.2.1",
54+
"version": "1.2.3",
5555
"depth": 0,
5656
"source": "registry",
5757
"dependencies": {},
@@ -72,7 +72,7 @@
7272
"url": "https://packages.unity.com"
7373
},
7474
"com.unity.test-framework": {
75-
"version": "1.1.16",
75+
"version": "1.1.18",
7676
"depth": 0,
7777
"source": "registry",
7878
"dependencies": {
@@ -83,7 +83,7 @@
8383
"url": "https://packages.unity.com"
8484
},
8585
"com.unity.textmeshpro": {
86-
"version": "3.0.1",
86+
"version": "3.0.3",
8787
"depth": 0,
8888
"source": "registry",
8989
"dependencies": {
@@ -92,7 +92,7 @@
9292
"url": "https://packages.unity.com"
9393
},
9494
"com.unity.timeline": {
95-
"version": "1.4.2",
95+
"version": "1.4.4",
9696
"depth": 0,
9797
"source": "registry",
9898
"dependencies": {

ProjectSettings/ProjectVersion.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 2020.2.0b2
2-
m_EditorVersionWithRevision: 2020.2.0b2 (90b2443a8df1)
1+
m_EditorVersion: 2020.2.0b9
2+
m_EditorVersionWithRevision: 2020.2.0b9 (ef2968fa77ae)

0 commit comments

Comments
 (0)