kuligs2
The problem is how to restore the default value of global variables. Compared to a node, I can definitely queue_free() that node, and then use packedscene to generate a new node, which will restore the default value. This is very simple, I know. But what I encountered was how to restore the default value of an automatically loaded script. I tried the above method, but now I can no longer find it, it becomes NULL. Example:
A is an automatic loading script
I will add A queueun_free()
Then, the. gd file new()
Insert the root node,
He indicated that node A has been released, which proves that the new one I have added cannot replace the original one.
So can I only set properties to default values one by one
Is there anything else I can do