Skip to content

Commit 0a62cd5

Browse files
committed
fix: target importer used instead of object importer in serialization
1 parent de85fd0 commit 0a62cd5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Editor/SOVariant.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ private void WriteToImporter(AssetImporter importer, string parent, string overr
436436
{"childrenGUIDs", children}
437437
});
438438

439-
if (CheckForUserDataAndOverride(_import, _import.userData, data))
439+
if (CheckForUserDataAndOverride(importer, importer.userData, data))
440440
importer.userData = JsonConvert.SerializeObject(new Dictionary<string, string>()
441441
{{"SOVariantData", data}});
442442
}
@@ -464,7 +464,7 @@ private bool CheckForUserDataAndOverride(AssetImporter importer, string oldData,
464464
{
465465
switch (EditorUtility.DisplayDialogComplex(
466466
"Replace user data",
467-
$"While trying to save the SOVariant object \"{_target}\", a previous UserData entry " +
467+
$"While trying to save the SOVariant object \"{importer.assetPath}\", a previous UserData entry " +
468468
$"was found which can not be loaded into a Json file: \"{importer.userData}\", conflicting with " +
469469
$"saving the data at hand.\nWould you like to override it? " +
470470
$"(Aborting will prevent the modified SOVariant data to be saved)\n\n" +

0 commit comments

Comments
 (0)