x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprint struct variable, error on recompile

I'm having an incredibly time consuming and frustrating issue which using C++ declared (but Blueprint Type marked) structs in blueprint. My struct looks like this:

 USTRUCT(BlueprintType)
 struct FDataFile
 {
     GENERATED_USTRUCT_BODY()
 
     UPROPERTY(BlueprintReadWrite, Category = DataFiles)
         float fileSize;
     UPROPERTY(BlueprintReadWrite, Category = DataFiles)
         FString fileName;
     UPROPERTY(BlueprintReadWrite, Category = DataFiles)
         FString fileContents;
     UPROPERTY(BlueprintReadWrite, Category = DataFiles)
         TSubclassOf<UUserWidget> fileType;
 
     FDataFile()
     {
     }
 };

The issue I'm having is that whenever I make any edit in the C++ script this struct is delcared in (either to the struct itself or the class in the same .h file) and then recompile (this is using compile from editor, so a hot reload in case that matters), every struct I have as a blueprint variable errors with the message "The variable variableX in blueprintY has an invalid type Array of Structures" (In this case it's an array, but the same happens for single struct variables.) Meaning I have to completely redeclare the variable and remake any links or functions it was being used in.

Product Version: UE 4.9
Tags:
more ▼

asked Nov 10 '15 at 04:14 PM in Blueprint Scripting

avatar image

Ungalyant
102 11 15 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

This issue seems to have been fixed by subsequent builds, I'm now on 4.11

more ▼

answered May 02 '16 at 12:12 PM

avatar image

Ungalyant
102 11 15 23

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I'm not using cpp with my project but there is a similar error you get when modifying structures or array structures in blueprints.

First I'd like to confirm that you're not trying to use an array structure within an array -- the engine seems to have a ton of issues with this.

Moving on: If you make a change to your structure or have try going into every blueprint that uses the structure and save/compile. May fix your issue, here's to hoping.

more ▼

answered Nov 10 '15 at 05:22 PM

avatar image

Distul
536 33 22 39

avatar image Ungalyant Nov 10 '15 at 05:27 PM

Hey Distul,

Thanks for coming with some answers.

No I'm not using arrays within arrays (although my structure itself does contain a TArray, would that matter?) but the array of structures in the blueprint is on its own.

I have tried compiling the scripts, but the errors persist. I found a similar issue:

https://answers.unrealengine.com/questions/280404/when-i-re-compile-project-code-blueprint-variables.html

Which seems to suggest I just shouldn't hot reload. I will try that for a while and see if I continue to get no errors.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question