Hi, after following the Nested ScriptableObject Rename Bug the solution works fine, however I’ve found another case where it breaks. It’s not a huge issue, but perhaps to note that it exists and to hopefully come up with a solution: The duplication has the same behavior as renaming, but the given solution doesn’t work for it.
I’ve played around a bit with options and found that the OnWillCreateAsset is not called on duplication, but OnWillSaveAssets is. The problem is that the function gets an array of paths, however, it is empty.
static string[] OnWillSaveAssets(string[] paths)
{
Debug.Log("OnWillSaveAssets " + paths.Length);
foreach (string path in paths)
Debug.Log("Saving asset " + path);
return paths;
}
The Debug here returns OnWillSaveAssets 0 on dialogue duplication, which is sadly useless.
Do you have any other ideas on how to fix this?