Add option *Show asset references graph* to content context menu
This commit is contained in:
@@ -122,6 +122,21 @@ String Scene::GetDataFolderPath() const
|
||||
return Globals::ProjectContentFolder / TEXT("SceneData") / GetFilename();
|
||||
}
|
||||
|
||||
Array<Guid> Scene::GetAssetReferences() const
|
||||
{
|
||||
Array<Guid> result;
|
||||
const auto asset = Content::Load<SceneAsset>(GetID());
|
||||
if (asset)
|
||||
{
|
||||
asset->GetReferences(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: serialize scene to json and collect refs
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
MeshCollider* Scene::TryGetCsgCollider()
|
||||
|
||||
@@ -110,6 +110,13 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() String GetDataFolderPath() const;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the asset references (scene asset). Supported only in Editor.
|
||||
/// </summary>
|
||||
/// <seealso cref="Asset.GetReferences"/>
|
||||
/// <returns>The collection of the asset ids referenced by this asset.</returns>
|
||||
API_FUNCTION() Array<Guid, HeapAllocation> GetAssetReferences() const;
|
||||
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user