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"

Why won't TAssetPtr won't accept UPaperSprite as a type

When trying to setup a DataTable that would house a Content Reference to a Paper2D Sprite, I ran into an issue with TAssetPtr not recognizing the UPaperSprite type. Here's the error message I was getting:

 Unrecognized type 'UPaperSprite' (in expression TAssetPtr<UPaperSprite>) - type must be a UCLASS

I'm able to get the Content Reference to work in the DataTable by making the TAssetPtr use UObject (TAssetPtr), but then I have to cast the resolved Asset ID from an Object to a Paper2DSprite each time I want to get the Paper2D Sprite out of the DataTable.

The documentation says UPaperSprite is a UCLASS (see: https://docs.unrealengine.com/latest/INT/API/Plugins/Paper2D/UPaperSprite/index.html).

Is there a reason UPaperSprite isn't accepted by TAssetPtr?

Product Version: Not Selected
Tags:
more ▼

asked Nov 28 '16 at 07:35 AM in C++ Programming

avatar image

JonathanADaley
644 37 49 78

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

1 answer: sort voted first

in "ProjectName.Build.cs", you must add "Paper2D" to public dependency .

This is sample code.

PublicDependencyModuleNames.AddRange(new strint[] { "Core, "CoreUObject", ... , "Paper2D"});

more ▼

answered Feb 13 '17 at 04:35 AM

avatar image

inkey
1 2 2

avatar image JonathanADaley Feb 13 '17 at 07:42 AM

Thanks for the info.

(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