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"

Cannot construct objects of type

After upgrading to 4.18 I got new errors in my blueprints on creation objects from C++ class using "Construct Object from Class" node.

alt text

This code worked well with 4.16 and it looks like it's not working since 4.17.

Project has no compilation errors or warnings in C++ code.

Sources of the class that I'm trying to construct: CommandHistory.h CommandHistory.cpp

What I've already tried:

  • Remove the node and create it again (nothing changed)

  • Clean the project and rebuild it (nothing changed)

  • Get rid of default constructor in my class in case of some other constructor is used (nothing changed)

  • Upgrade and build project on a different PC in case of broken UE4 installation (nothing changed)

Product Version: UE 4.18
Tags:
more ▼

asked Dec 23 '17 at 12:07 PM in C++ Programming

avatar image

RuWhyNot
57 5 10 18

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

1 answer: sort voted first

Did you try using BlueprintType in the UCLASS specifier?

more ▼

answered Dec 23 '17 at 02:44 PM

avatar image

birdfreeyahoo
870 46 44 80

avatar image RuWhyNot Dec 23 '17 at 05:46 PM

That helped! Thanks!

avatar image PC-hris Mar 05 '19 at 08:39 AM

Can you elaborate what that means?

avatar image Athelios Mar 08 '19 at 01:21 PM

It means you declare class as follows:

 UCLASS(BlueprintType)
 class ... : public UObject
 {
 GENERATED_BODY()
 };
avatar image PC-hris Mar 09 '19 at 10:55 PM

Is there a way to do this for a blueprint class?

(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