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"

Header file to include for TSoftObjectPtr?

I've been Googling for a while and found nothing. Could someone point me to the direction? Weird there isn't even an API page on it.

Product Version: UE 4.17
more ▼

asked Oct 13 '17 at 10:00 AM in C++ Programming

avatar image

28 1 4 6

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

1 answer: sort voted first

Hi. There is no TSoftObjectPtr class in the engine at all. Are you trying to get a TWeakObjectPtr? It declared here: UE_4.17\Engine\Source\Runtime\Core\Public\UObject\WeakObjectPtrTemplates.h and can be included with Core.h, CoreMinimal.h and many other headers.

more ▼

answered Oct 13 '17 at 10:12 AM

avatar image

1k 13 8 31

avatar image dchamploo Oct 13 '17 at 10:19 AM

But I saw it brought up in the following documentation pages, are they outdated, or is the functionality replaced by another class?

https://docs.unrealengine.com/latest/INT/Programming/Assets/ReferencingAssets/ https://docs.unrealengine.com/latest/INT/Gameplay/DataDriven/

avatar image c4tnt Oct 13 '17 at 10:23 AM

I guess it's just a misprint there. There is no any "TSoftObjectPtr" text in search results on whole engine sources

Maybe there was used FStringAssetReference - textual reference to the asset which can be resolved and loaded later. You can find it here: UE_4.17\Engine\Source\Runtime\CoreUObject\Public\Misc\StringAssetReference.h

The most similar template I have found is a TAssetPtr - it lives in UE_4.17\Engine\Source\Runtime\CoreUObject\Public\UObject\AssetPtr.h (can be included as "UObject\AssetPtr.h")

avatar image dchamploo Oct 13 '17 at 10:29 AM

You are right, it seems TWeakObjectPtr is the class I'm looking for. Thanks

avatar image NuLL3rr0r Oct 14 '17 at 07:34 AM

TSoftObjectPtr is not a misprint. It was added in 4.18 and I believe since the finial release is near they have updated the documentation. I built 4.18 brnach an hour ago and it resides inside UObject/SoftObjectPtr.h.

(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