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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Spawning a blueprint from FSoftObjectPath ?

Hello,

I used a FStreamableManager to load a Tarray of FSoftObjectPath.

 TArray<FSoftObjectPath> Lib00SoftObjectPaths;
 Streamable.RequestAsyncLoad(Lib00SoftObjectPaths, FStreamableDelegate::CreateUObject(this, &AYagUIBranchMain::FillCircle00));

Now i'm in the delegate and would like to spawn those loaded objects.

They are all blueprint assets.

The problem is that when trying to get the class for the UWorld::SpawnActor function, the only thing i could find was this:

 Lib01SoftObjectPaths[i].ResolveObject()->GetClass()

But this always gives the same class "Blueprint", and SpawnActor doesn't want to spawn that.

Any advice on how i should proceed ?

Thanks

Cedric

Product Version: UE 4.18
Tags:
more ▼

asked Nov 23 '17 at 10:02 PM in C++ Programming

avatar image

uced
855 75 92 361

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

1 answer: sort voted first

Hi. You just need to take this UBlueprint class (if it is valid) and check it's GeneratedClass member. There will be a class you really need. But this can be null when blueprint is not properly compiled (And you can't spawn an object if it's happened).

more ▼

answered Nov 23 '17 at 10:10 PM

avatar image

c4tnt
1k 13 8 31

avatar image uced Nov 24 '17 at 11:38 AM

Hey, exactly the pointer i needed, thanks a lot !

(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