# Could I get some help with Unreal Subclasses?

**URL:** <https://forums.unrealengine.com/t/could-i-get-some-help-with-unreal-subclasses/284832>\
**Category:** Cinematics & Media\
**Tags:** classes, controller, unreal-engine, CPP, question\
**Created:** [June 3, 2014, 2:46am UTC](https://forums.unrealengine.com/t/could-i-get-some-help-with-unreal-subclasses/284832 "2014-06-03T02:46:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joey.pla](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joey.pla](https://forums.unrealengine.com/u/joey.pla)\
**Post date:** [June 3, 2014, 2:46am UTC](https://forums.unrealengine.com/t/could-i-get-some-help-with-unreal-subclasses/284832/1 "2014-06-03T02:46:57Z")

</div>

Say I have a various of my own classes which are subclasses of various Unreal Engine Classes, like the following:

**ASBPlayerCameraManager** (subclass of **APlayerCameraManager** )

**ASBPlayerController** (subclass of **APlayerController** )

**AFPSCharacter** (subclass of **ACharacter** )

as of now, I have the following constructors for these classes:

ASBPlayerCameraManager:

```
ASBPlayerCameraManager::ASBPlayerCameraManager(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	//OLD VERSION
	/*
	ViewPitchMin = -89.9f;
	ViewPitchMax = 89.9f;
	ViewYawMin = 0.f;
	ViewYawMax = 359.999f;
	ViewRollMin = -89.9f;
	ViewRollMax = 89.9f;
	*/

	//FREE VERSION
	ViewPitchMin = 0.f;
	ViewPitchMax = 359.999f;
	ViewYawMin = 0.f;
	ViewYawMax = 359.999f;
	ViewRollMin = 0.f;
	ViewRollMax = 359.999f;
}

```

ASBPlayerController:

```
ASBPlayerController::ASBPlayerController(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{

}

```

AFPSCharacter:

```
AFPSCharacter::AFPSCharacter(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP.SetDefaultSubobjectClass<USBCharacterMovementComponent>(AFPSCharacter::CharacterMovementComponentName))
{
	FirstPersonCameraComponent = PCIP.CreateDefaultSubobject<UCameraComponent>(this, TEXT("FirstPersonCamera"));
	FirstPersonCameraComponent->AttachParent = CapsuleComponent;

	FirstPersonCameraComponent->SetRelativeLocation(FVector(0.0f, 0.0f, BaseEyeHeight + 50.0f));

	FirstPersonMesh = PCIP.CreateDefaultSubobject<USkeletalMeshComponent>(this, TEXT("FirstPersonMesh"));
	FirstPersonMesh->SetOnlyOwnerSee(true);
	FirstPersonMesh->AttachParent = FirstPersonCameraComponent;
	FirstPersonMesh->bCastDynamicShadow = false;
	FirstPersonMesh->CastShadow = false;

	Mesh->SetOwnerNoSee(true);

	PrimaryActorTick.bCanEverTick = true;
}

```

How would I go about injecting my own subclasses into each other? I don’t seem to be understanding Unreal’s way of doing this too well yet. Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [June 3, 2014, 3:51am UTC](https://forums.unrealengine.com/t/could-i-get-some-help-with-unreal-subclasses/284832/2 "2014-06-03T03:51:34Z")

</div>

#Game Mode Class

it is in the Game Mode class that you declare your custom player controller class, and other custom classes!

#Wiki Tutorial

See this wiki tutorial of mine for a starting point!

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Rama

---

<div class="post-metadata">

**Author:** ![joey.pla](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@joey.pla](https://forums.unrealengine.com/u/joey.pla)\
**Post date:** [June 3, 2014, 5:36am UTC](https://forums.unrealengine.com/t/could-i-get-some-help-with-unreal-subclasses/284832/3 "2014-06-03T05:36:18Z")

</div>

perfect, thanks alot!
