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

Commit 40cccdc

Browse files
committed
fix: visual of holder
1 parent 99749cc commit 40cccdc

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Packages/com.nuclearband.sodatabase/Runtime/Holders/Holder.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ public Holder()
1818
public string Name;
1919

2020
[ShowInInspector]
21+
[HorizontalGroup("Path")]
2122
protected string tempPath;
2223
[ShowInInspector]
24+
[HorizontalGroup("Name")]
2325
protected string tempName;
2426

2527
public Holder(string path, string name)
@@ -34,15 +36,22 @@ public virtual void Select()
3436
tempName = Name;
3537
}
3638

39+
[HorizontalGroup("Path")]
40+
[ShowIf("@Path != tempPath")]
3741
[Button]
3842
protected abstract void Move();
3943

44+
[HorizontalGroup("Name")]
45+
[ShowIf("@Name != tempName")]
4046
[Button]
4147
protected abstract void Rename();
4248

4349
[Button]
50+
[GUIColor(0.7f, 0.7f, 1f)]
4451
protected abstract void Clone();
52+
4553
[Button]
54+
[GUIColor(1f, 0.7f, 0.7f)]
4655
protected abstract void Remove();
4756
#endif
4857
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ static void LoadFolderHolder(FolderHolder folderHolder, string path)
123123
if (!string.IsNullOrEmpty(path))
124124
fullPath = path + '/' + fullPath;
125125
var json = PlayerPrefs.GetString(fullPath);
126+
if (string.IsNullOrEmpty(json))
127+
continue;
126128
JsonConvert.PopulateObject(json, dataNodePair.Value);
127129
}
128130

0 commit comments

Comments
 (0)