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"

Cannot set BP variable type to custom UObject class

I have a C++ class derived from UObject. Constructing (i.e. instantiating) and using that class in a level BP works fine, e.g. I can call the object's methods. Now I wanted to save that object into a BP variable within the level BP.

However, that does not work as I thought, because I cannot set the new variable's type to the custom C++ class. And if I set the variable's type to Object, then I cannot cast that to the custom class. In both cases the name of my C++ class just does not show up in the list of possible variable types.

So what do I need to do in order to set the type of a BP variable to a custom C++ class derived from UObject?

Product Version: UE 4.11
more ▼

asked Apr 04 '16 at 02:48 PM in Bug Reports

avatar image

236 21 36 45

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

1 answer: sort voted first

Hey haimat-

If you include Blueprintable and BlueprintType inside the UCLASS() macro you should be able to both create a blueprint based on your class as well as use the class as a type for variables inside blueprints.


Doug Wilson

more ▼

answered Apr 04 '16 at 03:48 PM

avatar image haimat Apr 05 '16 at 10:07 PM

Thanks, that did the trick!

(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