本文整理汇总了C++中AssetPtr::Type方法的典型用法代码示例。如果您正苦于以下问题:C++ AssetPtr::Type方法的具体用法?C++ AssetPtr::Type怎么用?C++ AssetPtr::Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetPtr
的用法示例。
在下文中一共展示了AssetPtr::Type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetScriptAsset
void OgreScriptEditor::SetScriptAsset(const AssetPtr &scriptAsset)
{
asset = scriptAsset;
assert(asset.lock());
AssetPtr assetPtr = asset.lock();
if (!assetPtr)
LogError("OgreScriptEditor: null asset given.");
if (assetPtr->Type() != "OgreMaterial" && assetPtr->Type() != "OgreParticle")
LogWarning("Created OgreScriptEditor for non-supported asset type " + assetPtr->Type() + ".");
lineEditName->setText((assetPtr?assetPtr->Name():QString()));
setWindowTitle(tr("OGRE Script Editor:") + (assetPtr?assetPtr->Name():QString()));
if (assetPtr && !assetPtr->IsLoaded())
{
AssetTransferPtr transfer = framework->Asset()->RequestAsset(assetPtr->Name(), assetPtr->Type(), true);
connect(transfer.get(), SIGNAL(Succeeded(AssetPtr)), this, SLOT(OnAssetTransferSucceeded(AssetPtr)));
connect(transfer.get(), SIGNAL(Failed(IAssetTransfer *, QString)), SLOT(OnAssetTransferFailed(IAssetTransfer *, QString)));
}