Fix collision assets creation in non asset folders.
This commit is contained in:
@@ -141,7 +141,13 @@ namespace FlaxEditor.Content
|
||||
});
|
||||
};
|
||||
var initialName = (modelItem?.ShortName ?? Path.GetFileNameWithoutExtension(model.Path)) + " Collision";
|
||||
Editor.Instance.Windows.ContentWin.NewItem(this, null, create, initialName, withRenaming);
|
||||
|
||||
// If folder can not have assets then move to folder with the model and create asset
|
||||
var contentWin = Editor.Instance.Windows.ContentWin;
|
||||
if (!contentWin.CurrentViewFolder.CanHaveAssets)
|
||||
contentWin.Navigate(modelItem?.ParentFolder?.Node);
|
||||
|
||||
contentWin.NewItem(this, null, create, initialName, withRenaming);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user