Hi everyone,
I am on Unreal Engine 5.5.3, and I am trying to make a custom Control Rig class in C++, as in one that I could just add to a Control Rig Node in Animation BPs like this:
The C++ Classes so far looks like this:
// MyCustomControlRig.h
#pragma once
#include "CoreMinimal.h"
#include "ControlRig.h"
#include "MyCustomControlRig.generated.h"
/**
*
*/
UCLASS(Blueprintable)
class PACAM_API UMyCustomControlRig : public UControlRig
{
GENERATED_BODY()
public:
UMyCustomControlRig();
virtual bool Execute(const FName& InEventName) override; // Tick() equivalent
virtual void Initialize(bool bRequestInit) override; // BeginPlay() equivalent, initialize variables here
};
and
// MyCustomControlRig.cpp
#include "MyCustomControlRig.h"
UMyCustomControlRig::UMyCustomControlRig()
{
}
void UMyCustomControlRig::Initialize(bool bRequestInit)
{
Super::Initialize(bRequestInit);
}
bool UMyCustomControlRig::Execute(const FName& InEventName)
{
Super::Execute(InEventName);
return false;
}
I tried to follow one of the top answers in this entry on creating a custom C++ control rig class to create the class, but the problem is that everytime I try to add it to a control rig, Unreal jsut crashes with the following error:
“Exception thrown at 0x0000022ADCE163CE (UnrealEditor-ControlRig.dll) in UnrealEditor.exe: 0xC0000005: Access violation reading location 0x0000000000000368.”
I am not sure why that is, especially because the class is setup exactly the same as in the post, and for them it seems to work well. Any help is appreciated!