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"

How to assign a UStruct parameter in a blueprint?


I have a C++ UFunction which takes a UStruct as a parameter, such as

UFUNCTION(BlueprintCallable, Category="foobar") void (UStruct *theStruct);

I am told during compilation that I need to make the parameter variable a pointer - which is fine, no problem with that.

But when I want to use this function within my blueprint, I can not assign a custom struct I made in the editor to the corresponding input pin.

The error message is that "Structure is not compatible with Structure Reference".

So, how can I make such a Structure Reference?

Thanks a lot and best regards, Martin

Product Version: UE 4.10
more ▼

asked Jan 23 '16 at 12:39 PM in C++ Programming

avatar image

101 5 7 12

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

1 answer: sort voted first

The UStruct type is only used when you want to access the reflection data on a low level. I don't think it can be used with blueprints at all, and anyway it's not used in the way you are trying to use it here. It describes the struct type, it does not hold an instance.

I don't believe there is currently any way to pass a blueprint struct to C++ unfortunately.

more ▼

answered Jan 24 '16 at 12:49 PM

avatar image

2.1k 83 37 121

avatar image mateun Jan 24 '16 at 02:02 PM

Thank you kamrann, I was thinking the same - it seems currently not possible what I am trying to do :)

(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