Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser
Quick Information
A simple plugin for that allows nodes to be persistently freed, so that they are removed even when switching scenes and returning.Doesn't effect scene files in any way, only acts at runtime.
Persistent Free is a simple plugin that allows nodes to be persistently freed, so that they are removed even when switching scenes and returning. Doesn't effect scene files in any way, only acts at runtime.
There's no extra setup needed - everything is handled by the persistent_free.gd file, which exposes functions for persistently freeing nodes.
HOWTO
If you want to persistently free a node, simply use:
PersistentFree.persistently_free(your_node)
If you just want to mark a node to be persistently freed next time the scene is loaded, but don't want to free it right now, use:
PersistentFree.mark_as_persistently_freed(your_node)
If you want to bring back a persistently freed node the next time its scene is loaded, you'll need its absolute NodePath.
Once you have that, use:
PersitentFree.undo_persistent_free(your_node_path)
The persistent_free.gd script is commented if you want to look into how it works.
CAVEATS:
1. PersistentFree uses NodePaths to identify nodes. If you move a node, such as if you reparent it, this changes its path.
If PersistentFree is told to free a node that isn't at its original path, it will fail and produce an error.
2. Persistent freeing only takes effect when the scene_changed signal is emitted from your SceneTree.
PersistentFree will not act on its own at any other time.
If you change scene manually, consider also manually emitting the scene_changed signal from your SceneTree.
3. Persistently freed nodes are only removed after the scene has been readied, meaning that they still briefly exist.
These nodes will still run their _init() and _ready() functions, but will be freed shortly after.
4. PersistentFree isn't built to be used on nodes that are not within the current_scene, such as autoloads.
While it can technically be used on such nodes, it's not recommended unless you know what you're doing and have a good reason.
A simple plugin for that allows nodes to be persistently freed,
so that they are removed even when switching scenes and returning.
Doesn't effect scene files in any way, only acts at runtime.
Reviews
Quick Information
A simple plugin for that allows nodes to be persistently freed, so that they are removed even when switching scenes and returning.Doesn't effect scene files in any way, only acts at runtime.