Area3D Circle Radius shared by all instances of scene

Godot Version



I’m trying to spawn multiple instances of a scene that are each randomly unique.

In the _on_ready I set the modulate and the %VisualArea/CollisionShape2D.shape.radius to ‘random’ values. While each instance of the scene has a unique colour, they all have the same VIsualArea size (according to the debug visualisation) and each time a new scene is added, all the areas update to a new random size.

Is this a bug in the debug UI, or does each instance of a scene share the same Circle?

I am curious as to the cause and whether there a simple way to get the behaviour I want?

Resources are shared by default. A Shape2D is a Resource. Enable Local to Scene in the Shape2D Resource or Resource.duplicate() it before modifying it in code.

1 Like

Thanks, I never opened the Resource section before :slight_smile: