# How to select existing scene component as a parameter in a custom scene/actor component?

**URL:** <https://forums.unrealengine.com/t/how-to-select-existing-scene-component-as-a-parameter-in-a-custom-scene-actor-component/394882>\
**Category:** C++\
**Tags:** parameters, scene-component, unreal-engine, question\
**Created:** [May 28, 2017, 2:55pm UTC](https://forums.unrealengine.com/t/how-to-select-existing-scene-component-as-a-parameter-in-a-custom-scene-actor-component/394882 "2017-05-28T14:55:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NorlinGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/norlingames/32/495614_2.png) [@NorlinGames](https://forums.unrealengine.com/u/NorlinGames)\
**Post date:** [May 28, 2017, 2:55pm UTC](https://forums.unrealengine.com/t/how-to-select-existing-scene-component-as-a-parameter-in-a-custom-scene-actor-component/394882/1 "2017-05-28T14:55:33Z")

</div>

I’m making a custom ActorComponent in C++ and want to have a parameter for UBoxComponent to select in a blueprint later.

But In the blueprint it’s only available to select a new (??) Box Collision in the dropdown, and I don’t see a way to select existing box component…

What’s wrong with it and how to make it properly?

Look for the screenshot: (“Volume” is a UBoxComponent)

 ![139532-scene_parameter.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/e/c4eedcf515f4de45ea2dc7375c4b2e1ae88efa1d.png)

In any cases I see only “None” and “Box Collision” items in the dropdown. Also if I choose “Box Collision” – it somehow adds a new box into the scene…

And that’s how I define the custom component:

```
#pragma once

#include "Components/ActorComponent.h"
#include "SpawnComponent.generated.h"

UCLASS( ClassGroup=(Spawn), meta=(BlueprintSpawnableComponent) )
class SHOOTEMUP_API USpawnComponent : public UActorComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	USpawnComponent();

	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

protected:
	// Called when the game starts
	virtual void BeginPlay() override;
		
private:
	UPROPERTY(EditAnywhere, Category = "Spawn")
	TSubclassOf<APawn> PawnClass;

	UPROPERTY(EditAnywhere, Category = "Spawn")
	UBoxComponent* SpawnBox = nullptr; 

	float LastSpawnedTime = 0;
	FVector GetSpawnLocation();
	APawn* SpawnAtLocation(FVector Location);
};
```

---

<div class="post-metadata">

**Author:** ![piontek](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/piontek/32/1194706_2.png) [@piontek](https://forums.unrealengine.com/u/piontek)\
**Post date:** [October 6, 2021, 1:01am UTC](https://forums.unrealengine.com/t/how-to-select-existing-scene-component-as-a-parameter-in-a-custom-scene-actor-component/394882/2 "2021-10-06T01:01:20Z")

</div>

bump, I have the exact same question.
