# Referencing a specific instance of an Actor Component

**URL:** <https://forums.unrealengine.com/t/referencing-a-specific-instance-of-an-actor-component/252005>\
**Category:** World Creation\
**Tags:** unreal-engine, UE4-26, instancing\
**Created:** [September 21, 2021, 10:46pm UTC](https://forums.unrealengine.com/t/referencing-a-specific-instance-of-an-actor-component/252005 "2021-09-21T22:46:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCGMarion](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mcgmarion/32/88712_2.png) [@MCGMarion](https://forums.unrealengine.com/u/MCGMarion)\
**Post date:** [September 21, 2021, 10:46pm UTC](https://forums.unrealengine.com/t/referencing-a-specific-instance-of-an-actor-component/252005/1 "2021-09-21T22:46:28Z")

</div>

Hi there!

I’m fairly new to UE and I’m wondering what’s the best way to have a reference to a specific instance of a component, **when the Actor has several instances of that component class**.

Specifics, if that helps :  
My level has Rooms in it, which are a C++ Actor subclass (because I have a lot of generic logic related to them) with several Blueprint instances (because each Room has its own layout).  
In those Rooms, I have Spots where I can place Items. Each Room can have any number of Spots.  
It seemed like a good idea to have the Spots as components, because again a lot of the logic is tied to the Room (which Items are in a Room, how many Spots are free in a Room…).

```auto
class USpotComponent : public UStaticMeshComponent { /* ... */ };

class ARoom : public AActor
{
	virtual void BeginPlay() override;

	TArray<USpotComponent*> Spots;
};

void ARoom::BeginPlay()
{
	Super::BeginPlay();	
	GetComponents<USpotComponent>(Spots); // Collect all Spots so I can use them in Room logic
}

```

My issue is that in my Item Actor, I would like to select the Spot where this Item is placed at the beginning of the game, but I can’t get a direct reference to a Spot component.

```auto
class AItem : public AActor
{
/* ... */
	UPROPERTY(EditAnywhere)
	ARoom* StartingRoom = nullptr;

	UPROPERTY(EditAnywhere)
	USpotComponent* StartingSpot = nullptr;
};

```

The StartingRoom property lets me pick any Room in my level, as expected, but I can’t pick a StartingSpot (it shows a drop-down where I can pick the component class but that does nothing…).

Is there any way to do this?  
I have considered using Child Actors but I read a lot of negative feedback about using them and I’m not sure I can safely keep a reference on a spawned Child Actor.

Thanks a lot for your insight!
