Ok so I’m following the ever so helpful youtube basic programming guide:
I’m also on a mac. And when I try and build my project I get an error saying:
“BlueprintReadWrite should not be used on private members”
The line it refers to is in the header file for my pickup class seen below:
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Actor.h"
#include "Pickup.generated.h"
/**
*
*/
UCLASS()
class MY_GAME_API APickup : public AActor
{
GENERATED_BODY()
//this bool variable is active inside the editor; can edit in blueprint editor with the macro here. True when able to be picked up, false otherwise
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Pickup);
bool bIsActive();
Now I’m not sure if this is related but I’m also getting errors saying “UnrealHeaderTool failed for target [MY_GAME_NAME]…” and it ends with “…UnrealHeaderTool.manifest”
Ok so that was it. But now I’ve run into a series of other issues. That intro video to UE4 where the Pickup class is created is definitely outdated. Does anyone know where I can find amore updated version of that by any chance, maybe something that goes over the basics of all the classes, macros, etc?
In UPROPERTY(…) you can add the argument meta = (AllowPrivateAccess = "true") to allow access of private variables from blueprints. This will fix the “BlueprintReadWrite should not be used on private members”.