Skip to content

Commit 858ee4c

Browse files
committed
compatibility with 2022.3
1 parent 895a64e commit 858ee4c

File tree

9 files changed

+260
-234
lines changed

9 files changed

+260
-234
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
2-
"name": "TableForge",
3-
"rootNamespace": "TableForge",
2+
"name": "TableForge.Demo",
3+
"rootNamespace": "TableForge.Demo",
44
"references": [
5-
"GUID:458aaf7e4c2647739214bee2d100d366",
6-
"GUID:979e8efe6d3b8a7449bbe88af2aed48c",
7-
"GUID:51d3ab7408564fc40847d935d944975f"
5+
"GUID:979e8efe6d3b8a7449bbe88af2aed48c"
86
],
97
"includePlatforms": [],
108
"excludePlatforms": [],
File renamed without changes.

Assets/TableForge/Editor/UI/Persistent/Metadata/TableMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public Type GetItemsType()
135135
Type type = Type.GetType(itemsTypeName);
136136
if (type == null)
137137
{
138-
Debug.LogError($"Failed to find type: {itemsTypeName}");
138+
Debug.LogWarning($"Failed to find type: {itemsTypeName}");
139139
return null;
140140
}
141141

Assets/TableForge/Editor/UI/Persistent/Metadata/TableMetadataManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static List<TableMetadata> GetAllMetadata()
116116
string path = GetDataPath();
117117
if (string.IsNullOrEmpty(path) || !Directory.Exists(path))
118118
{
119-
return null;
119+
return new List<TableMetadata>();
120120
}
121121

122122
string[] guids = AssetDatabase.FindAssets("t:TableMetadata", new[] { path });

Assets/TableForge/Editor/UI/Utilities/Extensions/VisualElementExtension.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ void OnEventPerformed(T evt)
7878
}
7979
}
8080

81-
public static void RegisterSingleUseCallbackOnce<T>(this VisualElement element, Action actionToPerform, TrickleDown trickleDown = TrickleDown.NoTrickleDown) where T : EventBase<T>, new()
82-
{
83-
element.RegisterCallbackOnce<T>(OnEventPerformed, trickleDown);
84-
85-
void OnEventPerformed(T evt)
86-
{
87-
actionToPerform?.Invoke();
88-
}
89-
}
90-
9181
public static void SwapChildren(this VisualElement element, VisualElement child1, VisualElement child2)
9282
{
9383
int index1 = element.IndexOf(child1);

Assets/TableForge/Editor/UI/Windows/TableDetailsWindow/TreeView/AssetTreeView.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public AssetTreeView(TableDetailsViewModel detailsViewModel)
4848
reorderable = false,
4949
};
5050
_treeView.AddToClassList(TableDetailsUss.AssetTree);
51-
_treeView.canStartDrag += _ => false;
51+
#if UNITY_6000_0_OR_NEWER
52+
_treeView.canStartDrag += _ => false;
53+
#endif
5254
_treeView.makeItem = MakeTreeItem;
5355
_treeView.bindItem = BindTreeItem;
5456
_treeView.unbindItem = UnbindTreeItem;
30.9 KB
Binary file not shown.
-14.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)