How to change the CollisionShape2D of an instance of a node without changing it for other instances?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Diet Estus

I have a custom node called CameraRect composed of an Area2D with a CollisionShape2D child. When the player enters these areas, the limits of my camera change.

The problem is that when I’m doing level design and want to change the size of one of these CameraRects, I toggle Make Local and Editable Children, but nonetheless changing the CollisionShape2D of one CameraRect affects all the others in my scene.

How can I get around this?

i would rather not use scale since it’s much easier to be precise changing the collision shape directly.

:bust_in_silhouette: Reply From: flurick

You can make sub-resources, like shapes, unique via code

duplicate( bool subresources=true ) 

and with the GUIRight click "Shape" in the inspector