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"

What are the limitations of Construct Object From Class?


I try to instantiate an object from a given class using the function Construct Object From Class. I do that with a BP Actor class I wrote but I get the following message when I compile the main BP:

Error Wrong class to spawn '/Game/WkSamples/Recherches/BPHandle/SimpleHandle.SimpleHandle_C' in Construct Object from Class

I tried with several other classes but I always get this error. It looks like this function is not documented. What are the limitations? What do I do wrong?

Thank you

Product Version: UE 4.10
more ▼

asked Dec 16 '15 at 11:02 PM in Blueprint Scripting

avatar image

98 9 16 20

avatar image gamingexpx12 Jan 07 '16 at 02:07 PM

I have the same issue and I've managed to replicate it in a new project. It seems Epic just tossed in a new node without testing it properly.

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

1 answer: sort voted first

This node is actually something I've waited forever to have and am so happy that it finally exists!

It allows you to spawn objects. That's pretty much all it does. If you want to spawn an actor (anything that has a location in the level) you will have to use "Spawn Actor From Class".

This node is exclusively for classes that are not actors. That derive from the core class "UObject" (or just "Object" if you only look at it in BP). It's the lowest level of Unreals inheritance hierarchy and allows you to have data and functionality stored without having any representation in your level.


more ▼

answered Jan 07 '16 at 03:11 PM

avatar image

5.9k 291 86 293

avatar image werwack Jan 20 '16 at 10:52 PM

Thank you very much ;)

avatar image romadoma Apr 21 '16 at 12:46 PM

Is there any way to add construction script for this new object? By default it hasn't ConstructionScript tab and, if ConstructionScript function created manually, it seems doesn't work. Also how to add arguments to ConstructionScript?

avatar image MacDx Sep 05 '16 at 02:22 AM

You should probably create something like a construction function in this object and then call it right after it was created.

avatar image Willard720 Sep 06 '16 at 03:41 AM

No matter what I do, it says, "Wrong class to spawn in." What kind of class do I need?

EDIT: Nevermind. The class has to be directly inherited from object. I missed that part.

avatar image Strombonni Apr 30 '18 at 11:22 PM

I kept trying to construct an blueprint inheriting from Object, and kept getting that error. Your comment made me realize I can create a base blueprint inheriting from Object, and have subclasses from that. Works great when you pass in the new base class type into the node. 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