Prefabs: how to acces child coordinates?

Hello everyone, I was testing recently added prefabs feature and did not figure out how to get the coordinates of child objects in them, here are the screenshots:

image

First action works perfectly: Green box changes its position to the position of a “Player” prefab.

In the second case, the box is placed at the coordinate of the red square as if the prefab was at 0:0 coordinates:

So prefab functions use coordinates of a prefab layout instead of coordinates of the scene the prefab is placed on.

How can I get the coordinates of a child object on the scene?

In the change log, they said they were working on expressions. I don’t know if they’ve been added yet.

Currently, you could either place the custom object at 0, 0 or add the child object position to the objects position.

I tested it with a shape painter and a child object with the drag behavior.

Custom objects are a bit like scenes within scenes. So, the layers aren’t always aligned. It’s like using different layers or cameras.

1 Like