[UE5.5] How to reference sibling actor in Editor

Hello,
I want to create a master “Spaceship” blueprint that is going to have several rooms inside it.
The rooms are blueprints inheriting from ASpaceshipRoom cpp class.

I also have the doors, blueprints inheriting from ASpaceshipDoor cpp class.

In the main BP_Spaceship blueprint i want to set up all the actors as child actors and I need to fill two properties in each door, in the editor:

	UPROPERTY(EditAnywhere, Category = "Door Setup", BlueprintGetter = GetConnectedRoom1)
	TObjectPtr<ASpaceshipRoom> ConnectedRoom1;

	UPROPERTY(EditAnywhere, Category = "Door Setup", BlueprintGetter = GetConnectedRoom2)
	TObjectPtr<ASpaceshipRoom> ConnectedRoom2;

The problem is this: in the editor, when i click on the ConnectedRoom property nothing shows up.
How do I make it possible to see the Rooms that are part of BP_Spaceship?

You should also make them blueprint readable / read & writable. Put BlueprintReadOnly or BlueprintReadWrite inside the UPROPERTY parentheses.


Yeah I realized that’s not the issue after taking a closer look at your screenshot. :rofl:

1 Like

Child Actors are very tricky, you never know where they might break down… :smirk:

You might be better off creating your spaceship as a separate level and then using it through a Level Instance Actor.

1 Like

Thank you to both of you!

I tried the BlueprintReadOnly but it still doesn’t work

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Door Setup", BlueprintGetter = GetConnectedRoom1, meta = (AllowPrivateAccess = "true"))
	TObjectPtr<ASpaceshipRoom> ConnectedRoom1;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Door Setup", BlueprintGetter = GetConnectedRoom2, meta = (AllowPrivateAccess = "true"))
	TObjectPtr<ASpaceshipRoom> ConnectedRoom2;

since child actors are tricky I will try doing it with Level Actors, thank you again!