0 votes

How do you remove meta data from a node? I can't find any remove_meta() function.

asked Aug 12 in Engine by Hubber116sx (32 points)

1 Answer

+1 vote

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) {

EDIT Switched the blob to the 3.1 branch for accuracy.

answered Aug 13 by Kyle Guarco (64 points)
edited Aug 13 by Kyle Guarco
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.