Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamespot |
what is difference between PackedScene.instance() and Node.duplicate()
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Gamespot |
what is difference between PackedScene.instance() and Node.duplicate()
Reply From: | kidscancode |
A PackedScene is a resource object, which may contain the data representing a hierarchy of nodes, resources, and other data. Calling instance()
on the PackedScene recreates that node hierarchy and its associated objects.
duplicate()
is a Node method that returns a duplicate of the given node.