-
-
Save onionmk2/ccc1cde6467f23feaed06b534721bc95 to your computer and use it in GitHub Desktop.
Revisions
-
rdeioris created this gist
Apr 11, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry"); TArray<FAssetData> AssetData; AssetRegistryModule.Get().GetAssetsByClass(UBlueprint::StaticClass()->GetFName(), AssetData, true); for (FAssetData& Asset : AssetData) { if (Asset.ObjectPath.ToString().StartsWith("/Game/")) { UE_LOG(LogTemp, Log, TEXT("Found Asset: %s %s %s"), *Asset.AssetName.ToString(), *Asset.AssetClass.ToString(), *Asset.ObjectPath.ToString()); UBlueprint* Blueprint = Cast<UBlueprint>(Asset.GetAsset()); if (!Blueprint) { UE_LOG(LogTemp, Error, TEXT("Unable to load asset %s"), *Asset.ObjectPath.ToString()); continue; } for (UEdGraph* Graph : Blueprint->FunctionGraphs) { TArray<UEdGraphNode_Comment*> Nodes; Graph->GetNodesOfClass<UEdGraphNode_Comment>(Nodes); for (UEdGraphNode_Comment* Node : Nodes) { UE_LOG(LogTemp, Log, TEXT("Found comment for %s:%s: %s"), *Asset.ObjectPath.ToString(), *Graph->GetName(), *Node->NodeComment); } } } }