I’m creating an editor module that hopefully will allow me to simulate actions of actors in the world from editor.
I have some basic tools from this module working and initially, I had a separate thread modifying the actors in the world, but that crashes the editor, obviously. In order to try this a different way, I’m trying to inherit from FTickableEditorObject so that the manipulation of objects in the world happens on an engine thread.
My module is set up and the public dependencies include UnrealEd, Engine, and Core. Those are the only few that I can think of that should be related.
When I create a class inheriting from FTickableEditorObject, I get the following error.
“Couldn’t find parent type for ‘BaseEditorTool’ named ‘FTickableEditorObject’ in current module or any other module parsed so far.”
Inheriting from FTickableObject yields the same result.
I have to be missing something in the dependencies, right? Do I need to rebuild the engine after updating project dependencies?
Any help would be much appreciated.
How do you declare such class? This sounds like UHT error
class MYMODULE_API BaseEditorTool : public FTickableEditorObject
Can’t see anything wrong right now.
You can only use UCLASS() before classes that related to UObject (which have U prefix) and all of them need to also have UCLASS() which most likely FTickableEditorObject does not have and thats why UHT can’t see it giving you this error.
So either if you not making UObject class remove UCLASS(Blueprintable) so UHT won’t process it or if this is indeed UObject related add it as a 2nd parent, C++ and UHT allows to do so in fact you can see examples in engine source, but 1st parent needs to be UObject or else UHT start to complain.
Looking on source this is exlusivly used with non-UObject classes, like those:
This is correct. The issue I had was that I had first made it as a UObject and then tried to replace that with FTickableEditorObject. I am now using both, but I still have to override the pure virtual functions GetStatId() and IsTickable() in FTickableObjectBase, even though the documentation led me to believe I only needed to implement the Tick() method.