Finding BP references to C++ enum's

is there a way to find all the instances of a c++ enum used in my blueprints? i’m asking as deleting or refactoring an enum could be dangerous if i don’t know where its used. if i was to write an enum in blueprint i could use the reference viewer inside the editor to find all the instances of its use but c++ enums don’t make an editor file to open the reference viewer on.

You can’t since C++ created Enumerators do not generate a blueprint class (the BlueprintType identifier is only to reflect them and allow them to be used in blueprints). Reference viewer can only show you blueprint class based objects.

I’m not quite sure however how you would go about finding every place you have used the class, since whenever making an enumerator visible in blueprints its simply to get it as a return value or something like thant and not to create variables of it in blueprints.

I’m leaving this as a comment since I know it does not fully answer your question. Have a nice day.

I think you mean Enum asset, which indeed it would generate reference on blueprint. Enum themselves should be findable, but i dont know the way to search all blueprints

If you have added it to a class as a member variable then you simply need to search for all derivatives of that class in the editor since they will all have it. If you have used it in blueprint code then you should be able to search all blueprints for the enum value (not the enum class itself, just the value you care about).

Sorry to resuscitate the thread but no solution was provided.
Best way I found to make them available

class UMyBlueprintLibrary: public UBlueprintFunctionLibrary

static UEnum* GetMyCPPEnum() {
    static UEnum* MyEnum = StaticEnum<MyCPPEnum>();
    return MyEnum ;

1 Like