本文整理汇总了C++中UPaperSprite::GetBakedTexture方法的典型用法代码示例。如果您正苦于以下问题:C++ UPaperSprite::GetBakedTexture方法的具体用法?C++ UPaperSprite::GetBakedTexture怎么用?C++ UPaperSprite::GetBakedTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UPaperSprite
的用法示例。
在下文中一共展示了UPaperSprite::GetBakedTexture方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QueryPaintableTextures
void FMeshPaintSpriteAdapter::QueryPaintableTextures(int32 MaterialIndex, int32& OutDefaultIndex, TArray<struct FPaintableTexture>& InOutTextureList)
{
UPaperSprite* Sprite = SpriteComponent->GetSprite();
checkSlow(Sprite != nullptr);
// Grab the sprite texture first
int32 ForceIndex = INDEX_NONE;
if (UTexture2D* SourceTexture = Sprite->GetBakedTexture())
{
FPaintableTexture PaintableTexture(SourceTexture, 0);
ForceIndex = InOutTextureList.AddUnique(PaintableTexture);
}
// Grab the additional textures next
FAdditionalSpriteTextureArray AdditionalTextureList;
Sprite->GetBakedAdditionalSourceTextures(/*out*/ AdditionalTextureList);
for (UTexture* AdditionalTexture : AdditionalTextureList)
{
if (AdditionalTexture != nullptr)
{
FPaintableTexture PaintableTexture(AdditionalTexture, 0);
InOutTextureList.AddUnique(AdditionalTexture);
}
}
// Now ask the material
DefaultQueryPaintableTextures(MaterialIndex, SpriteComponent, OutDefaultIndex, InOutTextureList);
if (ForceIndex != INDEX_NONE)
{
OutDefaultIndex = ForceIndex;
}
}