As per subject - can’t seem to work it out and moving everything to a new Object class is like hours of work and I can’t really be bothered - is there any way to do this?
There’s one way that kind of works, but it’s really annoying. Only takes like 5 minutes though.
Duplicate/backup your blueprint before trying this.
Click “Tools/Create C++ Class” and create a new class derived from UActorComponent.
Close the editor. Add “Blueprintable” (comma separated) to the UCLASS specifiers of your new class and rebuild. Open the editor.
Reparent your component to your new C++ class.
Save and close the editor.
In your new C++ class, change the base class from UActorComponent to UObject.
Remove “meta=(BlueprintSpawnableComponent)” from the UCLASS specifiers list in your C++ class.
Remove BeginPlay() and TickComponent. Remove PrimaryComponentTick.bCanEverTick = true; from the constructor.
Rebuild and open the editor.
Duplicate your blueprint and open it. It’ll bring back BeginPlay and TickComponent. Nothing will ever call these events. So remove them or rewire them.
You now have a blueprint that can then be reparented to almost anything if you change your mind. I still don’t know why it won’t reparent to UObject directly. You can create a blueprint from UObject directly but it seems you can never reparent to it.
Now, if you really want to fix this, you might be able to use redirects in your .ini files to force your C++ class to be redirected to UObject. Once you open your BP and you see that the parent is UObject, save it. Then you can delete your C++ class. I haven’t tried this but it should work.
as an addition to AlienRenders solution, if you are only wanting to “work” in Blueprints, having your Blueprint be parented to a C++ class doesn’t change much of anything (most all of the base blueprints in the engine have a C++ blackbone to begin with)
***be aware of what you are doing, a UObject will not appear in the Actor hierarchy, and must be held as a member variable Pointer***
the biggest reasons that an ActorComponent cannot be reparented to a base UObject:
in Blueprints specifically has to do with potentially confusing and frustrating general Engine users. where UObjects cannot be instantiated directly onto an actor, and would be shifted from the Actor Hierarchy into the member variables list, this could cause a bunch of “where did it go” moments. and that “where did it go” moment would need to be addressed for each object that ‘could’ have that component.
where most of the general purpose methods/events are first implemented in UActorComponent, or AActor (some have definition stubs in UObject/IUObjectInterface, but they are for Interface reasons, and the others only exist starting in UActorComponent, or AActor) the result would be confusion from people that do use those methods/events, and then again get confused on “why it isn’t working anymore”
the final reason has to do with object management and engine save serialization. an ActorComponent gets saved in a different way then a general UObject, they are also managed by GC very differently, so there could be a big question of potential corruption and indeterminant project states.
there are a few drawbacks for reparenting in general: you may lose some or all of your non-default values you have set in your blueprints, or the manually Instantiated actors/components in your level.
the pure Blueprint way to do this would be to:
create a new Blueprint parented to UObject
copy over all of the variables defined in the Member “Variables section”
manually create each function name (as a place holder)
do a ctrl+C on the original Blueprint Event graph
paste them into the new Blueprint, anything that comes up as “unrecognized” will need to be manually replumbed
next is your function implementations
manually create any local variables for each function
do the same Copy-paste from the original classes’ function to the corresponding one
continuing the replumbing when something is unrecognize
set the default values for the Member Variables, and the functions.
then you will need to go to each instance of the original ActorComponent blueprint add an instance of your new UObject
copying over the non-default values
double check you have copied over all the non-default values
then and only then remove the original Actor Component from that Actor.