Add and use cable component (C++ project)?
At runtime in debug editor mode (Win 64) the following breakpoint is triggered when trying to use a cable component in a c++ project.
UE4Editor.exe has triggered a breakpoint.
[Inline Frame] UE4Editor-Engine.dll!FWindowsPlatformMisc::DebugBreak() Line 56 C++ Symbols loaded.
I’m trying to create a grapple that is attached to a character. The following code has been placed in a character class. Is this setup the expected setup when using the cable component?
Header file
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = cable, meta = (AllowPrivateAccess = "true"))
class UCableComponent* Cable;
Source file
#include "CableComponent.h"
Constructor
Cable = CreateDefaultSubobject<UCableComponent>(TEXT("Cable"));
Cable->AttachToComponent(this->GetRootComponent(), FAttachmentTransformRules::KeepWorldTransform);
Cable->SetAttachEndTo(this, RootComponent->GetDefaultSceneRootVariableName());
In the build.cs file
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "CableComponent" });
PrivateDependencyModuleNames.AddRange(new string[] { "CableComponent" })
;