# Setting a Default value of a c++ class in Editor

**URL:** <https://forums.unrealengine.com/t/setting-a-default-value-of-a-c-class-in-editor/409181>\
**Category:** Blueprint\
**Tags:** default-value, unreal-engine, editor, Blueprint, CPP, question\
**Created:** [November 9, 2017, 5:03pm UTC](https://forums.unrealengine.com/t/setting-a-default-value-of-a-c-class-in-editor/409181 "2017-11-09T17:03:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hermi1991](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hermi1991](https://forums.unrealengine.com/u/hermi1991)\
**Post date:** [November 9, 2017, 5:03pm UTC](https://forums.unrealengine.com/t/setting-a-default-value-of-a-c-class-in-editor/409181/1 "2017-11-09T17:03:11Z")

</div>

Hey, i have a Actor with an attached Camera. This Camera is own Class inherited of CameraComponent to set some Default variables for every camera we use. The Problem is the Setting of these values. if i create a Blueprint of that camera(like suggested in other questions aswers), i’m able to set these values. The Problem is that my Actor with the camera is using the c++ camera class and is not affected by the Default values of the BP-Camera. So is there a way that the actor uses the BP-Class or a way to set these values in the Editor ?

---

<div class="post-metadata">

**Author:** ![Beregron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Beregron](https://forums.unrealengine.com/u/Beregron)\
**Post date:** [November 10, 2017, 10:57am UTC](https://forums.unrealengine.com/t/setting-a-default-value-of-a-c-class-in-editor/409181/2 "2017-11-10T10:57:37Z")

</div>

If you want to set variables that you created in C++ you have to declare it like:

UPROPERTY(EditAnywhere, BlueprintReadWrite …)  
float MyDistance;

Have a look here:

> **[C++ and Blueprints](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ClassCreation/CodeAndBlueprints/)**
>
> Introductory information for gameplay programmers getting started with Unreal Engine.
