![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Hubber116sx |
How do you remove meta data from a node? I can’t find any remove_meta()
function.
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Hubber116sx |
How do you remove meta data from a node? I can’t find any remove_meta()
function.
![]() |
Reply From: | Kyle Guarco |
Browsing Godot’s source code gives you the answer. It isn’t very clear at first, but setting the value to null
erases the key.
From godot/object.cpp:L1048 (blob from the 3.1 branch):
if (p_value.get_type() == Variant::NIL) {
metadata.erase(p_name);
return;
};
EDIT Switched the blob to the 3.1 branch for accuracy.