Typo of the year?

I spent 52 minutes on this typo, raging at Unreal Engine, glaring at the docs, firing log statements into the code with impunity…

void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

	if (PressurePlate->IsOverlappingActor(PressurePlate)) {
		OpenDoor();
	}
}

I ended up comparing against the GitHub repo, at which point I spotted it easily enough.

1 Like

I got something similar. When using VSCode, I dont have refactory options, so I had to build OpenDoor() manually. Meaning defining it in h-file and and declaring it in cpp-file.

Long story short, I learnt the hard way that this function must be declared in

protected:
	// Called when the game starts
	virtual void BeginPlay() override;
	
	void OpenDoor();

and not as public or private member function of class UOpenDoor.

1 Like

Privacy & Terms