Project can't find Cable Component .dll

I’m trying to spawn a cable component in c++ from the plugin to use as a rope attached to a harpoon. I tried adding the CableComponent module as a hard dependency, and that let me use ACableActor.h in my #includes, but when I start the editor, It crashes saying that I UE4Editor-CableComponent.dll is missing.

If I copy and paste the .dll from the Engine directory into my binaries, SpawnActor still can’t retrieve ACableActor’s static class. Is there an easy solution to this other than resorting to blueprints?

In HarpoonProjectile.cpp

void AHarpoonProjectile::OnActorBeginPlay()
{
	UWorld* const World = GetWorld();
	if (World)
	{
		FActorSpawnParameters SpawnParams;
		SpawnParams.Owner = this;
		SpawnParams.Instigator = Instigator;
		Rope = World->SpawnActor<ACableActor>(FVector(0.f, 0.f, 0.f), FRotator(0.f, 0.f, 0.f), SpawnParams);
		if (Rope)
		{

		}
	}
}

WhaleDefence.Build.cs

using UnrealBuildTool;

public class WhaleDefence : ModuleRules
{
	public WhaleDefence(TargetInfo Target)
	{
        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "CableComponent" });

        PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore", "CableComponent" });
		
	}
}

Hi Tarwine,

Could you provide some more information about the issue you are experiencing?

  • What version of the Editor are you using?
  • Are you using a binary version of the Editor installed through the launcher, or did you build it from source code?
  • Could you provide the callstack and crash logs?
  • What code do you have in the .h file for your HarpoonProjectile class?

Please see this page for more information that may be helpful to us.

Hi Tarwine,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.