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"

Issue with new stricter UHT and USTRUCTs

This isn't really a bug as such, but I think there is a problem with the 4.17 change which gives the following UHT error:

 Error: Cannot expose property to blueprints in a struct that is not a BlueprintType.

This prevents defining base USTRUCTs containing common properties that should be exposed to blueprint on instances of derived structs, without making the base struct itself BlueprintType.

I use this pattern often, where the base struct is just used to provide common properties (and sometimes C++ functionality) but is never intended to be instantiated itself. As far as I can see, with this change, I am now forced to have these structs cluttering the dropdown boxes and context menus within the blueprint editor, when I really don't want anyone to ever use the type directly.

Product Version: UE 4.17 Preview
more ▼

asked Jul 26 '17 at 02:19 PM in Bug Reports

avatar image

2.1k 83 37 121

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

1 answer: sort voted first

In the source code is the following specifier that you can use instead of BlueprintType:

 /// Indicates that a BlueprintType struct should not be exposed to the end user

I haven't tested it myself, but there are a number of structs in the engine which use this specifier on its own, so I'm assuming it implies BlueprintType, but you can test both using it on its own and using it with an explicit BlueprintType specifier to see which one gives you what you want.

Ideally there would just be an abstract specifier for structs, as that's what I'd recommend for a UCLASS (most dropdown menus are set to filter abstract classes). But that's more for semantic consistency - I'm pretty sure this will achieve what you want.

more ▼

answered Jul 26 '17 at 07:39 PM

avatar image

1.5k 55 36 73

avatar image kamrann Jul 27 '17 at 10:44 PM

Nice find, it does indeed have exactly the effect I need (used on its own as you guessed). Thanks!

(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