Hi
I’m sure I’ve done something wrong but the editor is crashing when i try and open the components tab of MyCharacter BP. Any ideas about what would cause this?
Edit: I’m now wondering if this isn’t something I’ve done wrong. I’ve now copied the code into a new project, in case the BP was corrupt. It’s still doing exactly the same thing. The only code that deviates significantly from the third person template, to do with the components, is;
In the header;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Interaction)
TSubobjectPtr<class USphereComponent> InteractionSphere;
private:
UFUNCTION()
void OnBeginOverlap(AActor* Other, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
UFUNCTION()
void OnEndOverlap(AActor* Other, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
In the .cpp constructor;
InteractionSphere = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("InteractionSphere"));
InteractionSphere->OnComponentBeginOverlap.AddDynamic(this, &MyProject::OnBeginOverlap);
InteractionSphere->OnComponentEndOverlap.AddDynamic(this, &MyProject::OnEndOverlap);
InteractionSphere->AttachTo(RootComponent);
InteractionSphere->SetSphereRadius(200.f);