Unable to move in targetPoint to blueprint dropdown

I have this code

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include “CoreMinimal.h”
#include “AIController.h”
#include “Runtime/Engine/Classes/Engine/TargetPoint.h”
#include “MyAIController.generated.h”

/**
*
*/
UCLASS()
class FPS_API AMyAIController : public AAIController
{
GENERATED_BODY()

public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
ATargetPoint* targetPoint;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float haha;

};

I made a blueprint of this class and am moving in a targetpoint in the game world into the blueprint but it doesn’t go there. The dropdown menu just keeps saying none. I made a float and I am able to put a number inside it but any sort of actor does not work

Try setting your Target point as an actor instead:

// ...
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite)
AActor* targetPoint;
// ...

I tried this but it still didn’t work. I can’t select any Actors from the dropdown or drag in any.

Your code seems fine… Did you “rebuild” your project from the editor before trying to add the actor?

I figured it out, the reason it isn’t working is because my blueprint isnt in the level. Seems I can only add to blueprints in the level and have to plug in my variables during runtime.

Oh well…

I thougt that “…moving in a targetpoint in the game world…” meant that you have placed the target point in the level.

Anyway, you should close your question.

My target point was in the level but my blueprint was not