Godot Version
4.2.2
Question
In the tutorial, I have to click Make Unique then I can click the loop checkbox. But what does Make Unique mean ? When should I use it ?
4.2.2
In the tutorial, I have to click Make Unique then I can click the loop checkbox. But what does Make Unique mean ? When should I use it ?
Suppose you have a CollisionShape2D node, and you give it a shape of a circle with a radius of 2. Suppose now that you duplicate that node so now you have a CollisionShape2D2. Lets call them A and B.
When A was duplicated to make B, it used the same collision shape. If you now change the shape of B, the shape of A will also change. However, if you make the collision shape of B to be unique, then it now becomes it’s own shape, no longer shared with B. So when you change the radius of B, the shape for A is not affected.
Making something unique, means it is not shared with other objects.
Multiple objects can use the same resource. Making that resource unique, means making a copy of it that is not related to the original resource.
Use “Make Unique” when you need to make sure that changes to a resource in one node or scene do not affect other nodes or scenes using the same resource.
Hope that helps.
Hi.
Godot nodes can share resources by reference. So a MeshInstance3D has a resource of type mesh. This resource can be used in other instances of MeshInstance3D. If you edit the mesh of one of this instances all other MeshInstance3D instances will change too. Making this resource unique will basicly create a copy of this mesh and assign it to the current MeshInstance3D mesh attribute. This behaviour is similar for all resources in godot.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.