6#include "UObject/Object.h"
8#include "ModBehavior.generated.h"
11UCLASS(Abstract, BlueprintType, Blueprintable, MinimalAPI, meta = (DontUseGenericSpawnObject))
18 UFUNCTION(BlueprintCallable, Category =
"Mod|Event")
23 MODLOADER_API UWorld*
GetWorld() const override;
27 MODLOADER_API
bool ResolveBehaviorTarget(FName TypeId, const TCHAR* Signature, uint64& Context, uint64& Object);
30 const TCHAR* Signature, uint64& Context, uint64& Object);
38 bool bPlayerProvider);
51 friend struct FModExtensionWorld;
53 MODLOADER_API
void ReleaseBehavior();
54 TWeakObjectPtr<UObject> BindingOwner;
55 uint64 BoundContext = 0;
56 uint64 BoundObject = 0;
57 bool bBorrowedBinding =
false;
58 bool bReleased =
false;
A Mod-owned behavior instance attached to its authorized World.
Definition ModBehavior.h:13
MODLOADER_API void UnbindEvent(const FModExtensionToken &Token)
Unsubscribes a delegate installed on this behavior.
MODLOADER_API UModBehavior * WrapBehaviorResult(UClass *Class, uint64 Context, uint64 Object)
Wraps an object result with the lifetime of the current call target.
MODLOADER_API bool ResolveBehaviorTarget(FName TypeId, const TCHAR *Signature, uint64 &Context, uint64 &Object)
Resolves the checked call target of an exported API.
MODLOADER_API UWorld * GetWorld() const override
Returns the World that owns the behavior instance.
virtual void RegisterBehavior()
Registers generated Hook and Event overrides during World preparation.
Definition ModBehavior.h:46
static MODLOADER_API bool ResolveBehaviorArgument(UObject &Owner, UModBehavior &Argument, FName TypeId, const TCHAR *Signature, uint64 &Context, uint64 &Object)
Resolves an object argument within the calling Mod and World.
MODLOADER_API UObject * GetBehaviorOwner() const
Returns the host-created Mod owner for this behavior.
MODLOADER_API int32 BindBehaviorEvent(FName Id, const TCHAR *Signature, FName SourceType, const FModBehaviorEvent &Delegate, FModExtensionToken &Token)
Binds a delegate to a published Event on this behavior.
static MODLOADER_API UModBehavior * FindBoundBehavior(UClass *Class, UObject *Owner, FName Alias, FName TypeId, bool bPlayerProvider)
Finds a typed reference using an alias authorized by the game.
static MODLOADER_API UModBehavior * MakeBoundBehavior(UClass *Class, UObject &Owner, uint64 Context, uint64 Object, bool bBorrowed)
Creates a typed reference from a host-issued binding.
Prepares and owns the extension plan for a single game World.
Definition ModExtensionSubsystem.h:203
Identifies a registration owned by one mod and World.
Definition ModExtensionLibrary.h:48