Add support for custom duplicate of SceneGraphNode
This commit is contained in:
@@ -65,6 +65,11 @@ namespace FlaxEditor.SceneGraph
|
||||
/// </summary>
|
||||
public virtual bool CanCopyPaste => true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance can be duplicated by the user.
|
||||
/// </summary>
|
||||
public virtual bool CanDuplicate => true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this node can be deleted by the user.
|
||||
/// </summary>
|
||||
@@ -359,6 +364,17 @@ namespace FlaxEditor.SceneGraph
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicates this object. Valid only if <see cref="CanDuplicate"/> returns true.
|
||||
/// </summary>
|
||||
/// <param name="undoAction">The undo action that duplicated the object (already performed), null if skip it.</param>
|
||||
/// <returns>The duplicated object node.</returns>
|
||||
public virtual SceneGraphNode Duplicate(out IUndoAction undoAction)
|
||||
{
|
||||
undoAction = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases the node and the child tree. Disposed all GUI parts and used resources.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user