Subclassing UBehaviorTree

I want to extend UBehaviorTree with some additional properies and functions. The obvious workaround would be to wrap the BT with another class, but I’d prefer not to do that.

Inheriting from UBehaviorTree was easy, but by default it didn’t show up in the editor. The next step was creating a factory and an AssetTypeAction, which worked fine when inheriting from FAssetTypeActions_Base. The problem with this is that the BT editor doesn’t open when the created asset is opened.

I thought I’d solve this by inheriting from FAssetTypeActions_BehaviorTree instead, which by default isn’t exposed by the engine. I’ve since added the BEHAVIORTREEEDITOR_API macro to it, and included the BehaviorTreeEditor module as a dependency in my project. This leads to linker errors.

The solution I’m looking for doesn’t necessarily have to use FAssetTypeActions, I’m mostly looking to extend UBehaviorTree and allow asset creation through the editor.

Header: #pragma once#include "AssetTypeActions_BehaviorTree.h"#include "Plan.h"c - Pastebin.com

Source: #include "Triassic.h"#include "FAssetTypeActions_Plan.h" - Pastebin.com

Build.cs: using UnrealBuildTool;using System.IO;public class Triassic : ModuleRule - Pastebin.com