# Unreal FInd Enum Always nullptr

**URL:** <https://forums.unrealengine.com/t/unreal-find-enum-always-nullptr/1337300>\
**Category:** C++\
**Tags:** ENUM, unreal-engine, question\
**Created:** [October 19, 2023, 1:51am UTC](https://forums.unrealengine.com/t/unreal-find-enum-always-nullptr/1337300 "2023-10-19T01:51:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moris0712](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Moris0712](https://forums.unrealengine.com/u/Moris0712)\
**Post date:** [October 19, 2023, 1:52am UTC](https://forums.unrealengine.com/t/unreal-find-enum-always-nullptr/1337300/1 "2023-10-19T01:52:00Z")

</div>

My Unreal Enum looks like this:

UENUM(BlueprintType)  
enum class EDataTableName : uint8  
{  
None = 0 UMETA(DisplayName = “None”),  
AvatarCategory = 1 UMETA(DisplayName = “AvatarCategory”),  
AvatarItem = 2 UMETA(DisplayName = “AvatarItem”),  
BroadCasting = 3 UMETA(DisplayName = “BroadCasting”),  
CameraScene = 4 UMETA(DisplayName = “CameraScene”),  
Character = 5 UMETA(DisplayName = “Character”),  
CharacterDefaultItem = 6 UMETA(DisplayName = “CharacterDefaultItem”),  
Emote = 7 UMETA(DisplayName = “Emote”),  
FaceMorph = 8 UMETA(DisplayName = “FaceMorph”),  
HairGroups = 9 UMETA(DisplayName = “HairGroups”),  
Item = 10 UMETA(DisplayName = “Item”),  
ItemSlot = 11 UMETA(DisplayName = “ItemSlot”),  
};

I tried FindObject to find an Enum called EDataTableName in the code, but it keeps returning only nullptr.

const TObjectPtr EnumPtr = FindObject(nullptr, TEXT(“EDataTableName”), true);  
const TObjectPtr EnumPtr = FindObject(nullptr, TEXT(“/Script/PluginName.EDataTableName”), true);

The process of finding that Enum is executed within the Initialize function of GameInstanceSubsystem. Is this due to a timing issue?

Changing this would require a lot of code modifications  
Is there a solution?

---

<div class="post-metadata">

**Author:** ![Moris0712](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Moris0712](https://forums.unrealengine.com/u/Moris0712)\
**Post date:** [October 19, 2023, 1:59am UTC](https://forums.unrealengine.com/t/unreal-find-enum-always-nullptr/1337300/2 "2023-10-19T01:59:25Z")

</div>

It was said that ANY\_PACKAGE was not used when moving to UE5.

const TObjectPtr EnumPtr = FindObject(ANY\_PACKAGE, TEXT(“EDataTableName”), true);

It works well when I do this.  
What the…
