Break C++ USTRUCT in Blueprint seems to be deprecated

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:

#pragma once

#include "Object.h"
#include "SessionSearchWrapper.generated.h"

/**
 * 
 */

USTRUCT(BlueprintType)
struct FSessionSearchWrapperStruct
{
	GENERATED_USTRUCT_BODY()

UPROPERTY(BlueprintReadWrite, Category = "sessionstuff")
FOnlineSessionSearchResult searchResult;

UPROPERTY(BlueprintReadWrite, Category = "sessionstuff")
FName ServerName;
};

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?

thanks (hopefully)

Hmmm try changing GENERATED_USTRUCT_BODY() to GENERATED_BODY()

Hmm nope. no change when I did that :confused:

Maybe something like BlueprintReadWrite needs to go in the parentheses after the GENERATED_USTRUCT_BODY or GENERATED_BODY?

I shall try that.

No, that didn’t work either. I WILL FIX IT TOMORROW. XD

Try with:

USTRUCT()
struct FSessionSearchWrapperStruct
{
    GENERATED_USTRUCT_BODY()
 
    UPROPERTY(BlueprintReadWrite, Category = "sessionstuff")
    FOnlineSessionSearchResult searchResult;
 
    UPROPERTY(BlueprintReadWrite, Category = "sessionstuff")
    FName ServerName;
    
    FSessionSearchWrapperStruct()
    {
        ServerName = TEXT("Undefined");
    }
};

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.

A nice article about USTRUCTS by : A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

If that doesn’t work for you then I suggest you to upgrade to 4.11.

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.

in the meantime, have any ideas for this problem?

AH, so that is just because in the USTRUCT(), there was no BlueprintType
in the parentheses. but I added that and I have the old problem again. :confused:

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

I’m on 4.11 and there’s no need to use the BlueprintType specifier. The example I’ve shown you works perfectly.

well, here is a screenshot of the break node. this might help everyone to understand exactly what is going on.

WELL today I tried downloading 4.11, and it gave me the same error as it has the last 5 times I have tried. A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums
I am getting E-1223. I will try and solve this and then try your suggestion again.

This code works for me.

http://puu.sh/oC25j.png

// 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!!!