How to do it...

  1. Create a new Actor class called BlueprintPropertyActor using the editor wizard:
  1. Add the following UPROPERTY to the class using Visual Studio:
#pragma once#include "CoreMinimal.h"#include "GameFramework/Actor.h"#include "BlueprintPropertyActor.generated.h"UCLASS()class CHAPTER_09_API ABlueprintPropertyActor : public AActor{    GENERATED_BODY()    public:     // Sets default values for this actor's properties    ABlueprintPropertyActor();protected:    // Called when the game starts or when spawned    virtual void BeginPlay() override;public:     // Called every frame    virtual void Tick(float DeltaTime) override; UPROPERTY(BlueprintReadWrite, Category ...

Get Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.