# C++ actor in blueprint project

**URL:** <https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, CPP, question\
**Created:** [September 13, 2022, 8:56pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080 "2022-09-13T20:56:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artdyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artdyx](https://forums.unrealengine.com/u/Artdyx)\
**Post date:** [September 13, 2022, 8:56pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/1 "2022-09-13T20:56:27Z")

</div>

Hi, I newbie in c++ and i need some help  
I created c++ actor and I want to use this actor in other project but this project is blueprint type.

I suspect that there need to use plugin, but if I create plugin, will put my c++ actor there and just move this plugin folder into my other blueprint project i won’t see my actor

How can I implement this?

---

<div class="post-metadata">

**Author:** ![barracius-AOne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/barracius-aone/32/548049_2.png) [@barracius-AOne](https://forums.unrealengine.com/u/barracius-AOne)\
**Post date:** [September 13, 2022, 9:24pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/2 "2022-09-13T21:24:35Z")

</div>

Hi @Artdyx!

Actually, it’s not necessary to create a plugin for that. Just create a C++ file and set it as Blueprintable, BlueprintType on the specifiers of the UCLASS(). Also there is another post with the same question that can help you further [here](https://forums.unrealengine.com/t/how-can-i-convert-a-blueprint-project-to-c-project-in-ue5/526755/3)

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [September 13, 2022, 10:01pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/3 "2022-09-13T22:01:49Z")

</div>

Link to the docs 🙂 [Class Specifiers | Unreal Engine 4.27 Documentation](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/GameplayArchitecture/Classes/Specifiers/)

---

<div class="post-metadata">

**Author:** ![FishBone0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FishBone0](https://forums.unrealengine.com/u/FishBone0)\
**Post date:** [September 14, 2022, 5:35pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/4 "2022-09-14T17:35:40Z")

</div>

The project changes to c++ project if you click File-\>New C++ Class…  
You can then just delete the newly created files, and copy in your old files

A plugin should also work, but plugin-content are probably hidden in the content-browser.  
Clicking ViewOptions-\>ShowPluginContent in the content-browser might help

---

<div class="post-metadata">

**Author:** ![Artdyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artdyx](https://forums.unrealengine.com/u/Artdyx)\
**Post date:** [September 15, 2022, 7:13am UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/5 "2022-09-15T07:13:44Z")

</div>

But I don’t want to convert all my blueprint project to c++

I want to use my c++ actor to another projects regardless of the type project (how on screenshot in this link)

---

<div class="post-metadata">

**Author:** ![FishBone0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FishBone0](https://forums.unrealengine.com/u/FishBone0)\
**Post date:** [September 15, 2022, 12:47pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/6 "2022-09-15T12:47:59Z")

</div>

Seems like the link wasn’t posted, so not sure how it looks there.  
But it then should work in a plugin as i wrote.  
Creating a child-blueprint of it can also be an easy way to get it to show up in the content-browser.

---

<div class="post-metadata">

**Author:** ![barracius-AOne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/barracius-aone/32/548049_2.png) [@barracius-AOne](https://forums.unrealengine.com/u/barracius-AOne)\
**Post date:** [September 15, 2022, 2:41pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/7 "2022-09-15T14:41:55Z")

</div>

On the content browser (on the source section, C++ Classes or wherever you want really) press right click and create a new C++ Class.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/5/1b531e8a5029c290807ba1c65e0e2a8e1c4cf8ef.png)

Select Actor

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/a/43a36302f70feba72ed50651705ccdba4da87d02.png)

Then select where you want to create it, and its name (it can be changed later)

Then it should open your text editor (visual studio, rider, or whatever you have) on the just created class. Code it as you want.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/3/df3b1f7763a42bc955b51f1f81c54228cbad2e86.png)

In the header file you can add specifiers to the UCLASS(), for this example you will probably need BlueprintType and Blueprintable.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/f/39f98c2b7136549ca3651481f44c0f8fca72464b.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/8/07813537eac1418b9661746601721957337c6c7e.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/2/5b2b091d3643ca028ec343a4b3d47a7784852eec.png)

Compile it and now you can create new blueprint classes that inherit from AMyActor (or the actor you created on c++), you can also assign variables in BP as that class, for instance another class that has a variable of type AMyActor can now be used.

This doesn’t convert your project from Blueprint to c++, it just creates a class created on c++ that can be used alongside blueprint classes. Notice that blueprints are assets while cpp files are source, this means that blueprints can use c++ classes without any problems, but the same CAN NOT be said otherwise, using/referencing a bp from a cpp file is something I’m not sure is possible, and if it is, it will be a source of many headaches.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Artdyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artdyx](https://forums.unrealengine.com/u/Artdyx)\
**Post date:** [September 16, 2022, 2:11pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/8 "2022-09-16T14:11:13Z")

</div>

> [@barracius-AOne](#):
>
> can create new blueprint cla

Yeah it is really helpful. Really big Thanks!

After that can I move this actor to another blueprint’s project and it will work?

My purpose - create c++ actor in first project by use it in second project  
 ![Unreal Project Browser_220916171901](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/0/0304c2e58b978f188dcdf4cc6d15c2e5870a382b.png)

---

<div class="post-metadata">

**Author:** ![barracius-AOne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/barracius-aone/32/548049_2.png) [@barracius-AOne](https://forums.unrealengine.com/u/barracius-AOne)\
**Post date:** [September 16, 2022, 5:06pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/9 "2022-09-16T17:06:04Z")

</div>

> [@Artdyx](#):
>
> After that can I move this actor to another blueprint’s project and it will work?

Not right away, you would need to make sure the dependencies are okay (the #includes) and compile it again in the new project. It should work after that.

---

<div class="post-metadata">

**Author:** ![Artdyx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Artdyx](https://forums.unrealengine.com/u/Artdyx)\
**Post date:** [September 16, 2022, 5:34pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/10 "2022-09-16T17:34:16Z")

</div>

Anyway thanks for help  
But solution for me it is build plugin by this links

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/3/6d324bc24205ad0f4e851cc0014586484c8e7491.jpeg "Unreal Engine How To Sell Plugins #3: "PackagePlugin"") ](https://www.youtube.com/watch?v=SKArLiShb9c)

> **[How to Build Binary Plugins in UE4 | Mercuna](https://mercuna.com/building-binary-plugins-in-unreal-engine-4/)**
>
> Mercuna builds binary plugins for our evaluations. Learn how we do it.

and after that I can use this actor anywere

---

<div class="post-metadata">

**Author:** ![zos](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zos](https://forums.unrealengine.com/u/zos)\
**Post date:** [September 16, 2022, 9:21pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/11 "2022-09-16T21:21:33Z")

</div>

> [@barracius-AOne](#):
>
> In the header file you can add specifiers to the UCLASS(), for this example you will probably need BlueprintType and Blueprintable.

Actually `Blueprintable` is inherited by subclasses, and `AActor` is `Blueprintable`, so this isn’t be necessary. The same may also go for `BlueprintType`, I have never put either specifier on my actor subclasses and haven’t run into any problems as yet accessing properties or functions.

---

<div class="post-metadata">

**Author:** ![barracius-AOne](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/barracius-aone/32/548049_2.png) [@barracius-AOne](https://forums.unrealengine.com/u/barracius-AOne)\
**Post date:** [September 17, 2022, 6:42pm UTC](https://forums.unrealengine.com/t/c-actor-in-blueprint-project/648080/12 "2022-09-17T18:42:18Z")

</div>

Had no idea! Thanks!
