Skip to content

Commit e156233

Browse files
author
jpthek9
committed
Fix database loading with file extension;
1 parent 0161d60 commit e156233

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Database/Editor/EditorLSDatabaseWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void DrawDatabase () {
153153

154154
bool LoadDatabaseFromPath (string absolutePath) {
155155
string relativePath = absolutePath.GetRelativeUnityAssetPath ();
156-
LSDatabase database = AssetDatabase.LoadAssetAtPath (relativePath, DatabaseType) as LSDatabase;
156+
LSDatabase database = AssetDatabase.LoadAssetAtPath<LSDatabase>(relativePath);
157157
if (database != null) {
158158
LoadDatabase (database);
159159
return true;

Integration/Editor/LSEditorUtility.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ public static string GetRelativeUnityAssetPath(this string absolutePath)
675675
{
676676
relativePath = absolutePath;
677677
}
678-
678+
Path.GetFileNameWithoutExtension (relativePath);
679679
return relativePath;
680680
}
681681

0 commit comments

Comments
 (0)