SO, when I try to break a C++ USTRUCT in Blueprint, it gives me this error: “Break SessionSearchWrapperResult has no property tagged as BlueprintReadWrite or BlueprintReadOnly. The node will be removed in a future release.”
In the SessionSearchWrapper.h, all the variables are tagged as BlueprintReadWrite. here is the .h:
to me this looks like the break node is going to be deprecated. however it isn’t yet as far as I know and what I don’t know is whether it is referring to the break node in general which does not make sense or just the break of the SessionSearchWrapper.h which makes more sense but is completely without reason. Well I suppose THERE IS A REASON OR ELSE I WOULDN’T BE HERE.
is anybody else having this problem or more importantly has a solution to all those (like me) who have this problem?
You should always initialize your struct variables. Note that I didn’t initialize the searchResult variable because it is a struct.
Also keep in mind that your source file should be named “SessionSearchWrapperStruct.h” and your generated include should be “SessionSearchWrapperStruct.generated.h”.
You can also declare your USTRUCTS within your UCLASS headers. For example inside an actor header.
Ok so now there simply is no break node in the blueprint. I’ve heard some other people have had this problem but I haven’t found a solution to that because I did not have this problem before.
I will try and update to 4.11 ASAP but the launcher has been giving me errors when I try and do that but that is a different problem.
It looks good for me, maybe UHT wrongly alarm. Do you current code produces break node correctly of that struct? By sound of it seems currently UE4 creates pins for all properties regardless of there blueprint readibility status, the fix that will coming will make blueprint specifiers valid and if they not eather readwrite or readonly they wont apper in break pin or create pin
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GeneralStructs.generated.h"
/**
*
*/
// Structure with Byte Int Byte Int
USTRUCT(BlueprintType)
struct FByteIntByteInt
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (DisplayName = "Byte A"))
uint8 ByteValueA;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (DisplayName = "Int A"))
int32 IntValueA;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (DisplayName = "Byte B"))
uint8 ByteValueB;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Meta = (DisplayName = "Int B"))
int32 IntValueB;
FByteIntByteInt()
{
//Always initialize your USTRUCT variables!
// exception is if you know the variable type has its own default constructor
ByteValueA = 0;
IntValueA = 0;
ByteValueB = 0;
IntValueB = 0;
}
};
OK SO I UPDATED TO 4.11 AFTER MUCH DIFFICULTY WITH MANY THINGS AND NOW IT WORKS SO YEAH IF ANYBODY ELSE HAS THIS PROBLEM IN 4.10, IT IS THE ENGINE VERSION!!!