# A custom UClass not visible in Blueprint create menu!

**URL:** <https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 26, 2022, 8:19am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811 "2022-05-26T08:19:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [May 26, 2022, 8:19am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/1 "2022-05-26T08:19:52Z")

</div>

Hi,

i crerated a custom class which inherits from UObject , but it’s not visible in the Blueprint create menu !

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/5/ae5912ec2fb1efdd1f57fd1665f16c956db0eacf.png)

Can’t create a BP based on that class as it’s not visible  
Anyone can help with that !?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/0/e70bcfc8f7bcfad11335d96c734a1778e5c6313d.png)

---

<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:** [May 26, 2022, 8:21am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/2 "2022-05-26T08:21:07Z")

</div>

Write the UCLASS like this:

> UCLASS(BlueprintType, Blueprintable)

> [Documentation](https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/GameplayArchitecture/Classes/Specifiers/)

---

<div class="post-metadata">

**Author:** ![Arc\_lord](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arc_lord/32/489502_2.png) [@Arc\_lord](https://forums.unrealengine.com/u/Arc_lord)\
**Post date:** [May 26, 2022, 8:21am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/3 "2022-05-26T08:21:28Z")

</div>

correct!

---

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [May 26, 2022, 8:23am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/4 "2022-05-26T08:23:36Z")

</div>

Awesome 😃

Really appreciated !  
Thank you !

---

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [May 26, 2022, 8:39am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/6 "2022-05-26T08:39:26Z")

</div>

@Roy_Wierer.Seda145 one more question,

i have the asset created now, but do you know now why it’s not visible when i try to load it to the field ?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/d/a4d72d1954607c7b5b98d556afcfe335a864cc4a.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/6/f46d9a2184c52db09e291a1b40dfa623988ab360.png)

---

<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:** [May 26, 2022, 8:55am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/7 "2022-05-26T08:55:30Z")

</div>

If that is a property field on the editor panel of type “Object reference” then it makes sense that there is nothing to select. Those objects do not exist at that point, instead you should make the property type “class reference” or “Soft Object Ptr”.

_Image by ClockworkOcean_:  
 ![43a6c08f01a59d4c50f9c14b00fbc3adcc5d51ea_2_463x500](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/e/c7ec455927ca3ddc0202b649ffc7b7219aa6e2a6.jpeg)

---

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [May 26, 2022, 9:00am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/8 "2022-05-26T09:00:03Z")

</div>

It is actually a variable in the car controller C++ class

I created a blueprint based on the CarEngine class and i wanted to add it to another blueprint based on this ACarController class from the image !

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/f/91f4d0bc8f168c96c9c5b5419b8772ff7014c83c.png)

EDIT : hmm i also created Objcet Reference variable in the car BP to see if i can load it from there but still doesn’t show up

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/2/122e6e852dd828f05ce3f2d1c651b36c23684f59.png)

---

<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:** [May 26, 2022, 9:09am UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/9 "2022-05-26T09:09:11Z")

</div>

Yes but there is a difference between an object reference and a class reference. To be able to make an object reference to an object, the object must exist. Which means, an object of class UCarEngine must be spawned before a reference to it can be made.

So it you make a property like this you can set the class within Blueprint without requiring a spawned object:

```auto
UPROPERTY(EditAnywhere)
TSubclassOf<UCarEngine> CarEngineClass;

```

With that class, you can spawn as many objects as you like and those objects can be stored in a property of type:

```auto
UPROPERTY(EditAnywhere)
UCarEngine* CarEngineInstance;

```

In blueprint “TSubclassOf” is similar to the purple colored variable where an object reference is the blue color.

---

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [June 6, 2022, 4:42pm UTC](https://forums.unrealengine.com/t/a-custom-uclass-not-visible-in-blueprint-create-menu/566811/10 "2022-06-06T16:42:29Z")

</div>

Hey @Roy_Wierer.Seda145

using a “TSubclassOf\<\>” variable actually did the job. I don’t understand how it works in general, but i had it working this way:

```auto
UCarEngine carEngine = Cast<UCarEngine>(carEngineSubClass.Get()->GetDefaultObject());

```

where carEngineSubClass is of type TSubclassOf;

Thanks for the help 🙂
