简体   繁体   English

虚幻引擎 C++ UPaperSprite 数组?

[英]Unreal engine C++ UPaperSprite Array?

I'm trying to put some sprite in an Array like in my blueprint enter image description here我正在尝试像在我的蓝图中那样将一些精灵放入数组中,在此处输入图像描述

But it doesn't work and I can't find solution in UE4 documentation Whent I'm trying to do this:但它不起作用,我无法在 UE4 文档中找到解决方案当我尝试这样做时:

UPROPERTY()
TArray <UPaperSprite*>  spriteArray;

I have some errors like this:我有一些这样的错误:

error C2065: 'UPaperSprite'?: Undeclared identifier error C2065: 'UPaperSprite'?: 未声明的标识符
error C2059: syntax error?: '>' error C2059: 语法错误?: '>'

Thanks you guys:)谢谢你们:)

You need to go Project->Properties->IncludeSearchPath->Edit Enter 3 lines as below assume that your unreal engine is in D drive你需要去Project->Properties->IncludeSearchPath->Edit Enter 3 lines as below 假设你的虚幻引擎在D

D:\Program Files\Epic Games\UE_4.24\Engine\Plugins\2D\Paper2D\Source\Paper2D\Classes
D:\Program Files\Epic Games\UE_4.24\Engine\Plugins\2D\Paper2D\Source\Paper2D\Public
D:\Program Files\Epic Games\UE_4.24\Engine\Plugins\2D\Paper2D\Source\Paper2D\

Now you can include #include "PaperSpriteComponent.h"现在你可以包含#include "PaperSpriteComponent.h"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM