Deleting Nodes
Jungle is very strict about deleting node scripts. This is due to limitations with the Unity Asset Database and how it handles sub-assets. Jungle has safeguards in place to prevent nodes from losing metadata and serialized data when nodes go missing or are deleted via the file system.
If you delete a node script from your file system, Jungle cannot detect the change and will not be able to perform important clean up on your trees. This can create a ton of issues and is NEVER recommended.
There are two options for deleting nodes:
Marking the Node as Deprecated
The NodeProperties
attribute has a Deprecated
property that can be set to true
. This will mark the node as
deprecated and will remove it from the explorer and mark all instances of the node in the validator.
Steps
- Open the node script in your code editor.
- Add the
Deprecated
property to theNodeProperties
attribute and set it totrue
.
using Jungle;
[NodeProperties(
Title = "My Node",
// ↓↓↓↓↓↓↓↓↓↓ ↓↓↓↓
Deprecated = true
)]
public class MyNode : IdentityNode
...
Deleting the Node via Assets Window
Nodes can also be deleted like any other asset in Unity. This method is safe but is irreversible. If any instances of the node being deleted are found in any trees, Jungle will display a warning dialog to confirm the deletion.
Steps
- Locate the node script in the Assets window.
- Then you can either:
- Press the
Delete
key on your keyboard while the node script is selected. - Right-click the node script and select
Delete
from the context menu.
- Press the
This method is IRREVERSIBLE and will permanently remove all instances of the deleted node from all trees. All connections, metadata, and serialized data will be lost.