[
  {
    "path": ".gitignore",
    "content": "Binaries\nDerivedDataCache\nIntermediate\nSaved\n.vscode\n.vs\n*.VC.db\n*.opensdf\n*.opendb\n*.sdf\n*.sln\n*.suo\n*.xcodeproj\n*.xcworkspace\n.idea/\n*.uproject.DotSettings.user\nPlugins/Developer/\nPlugins/HoudiniEngine/\n*_bak[0-9].hiplc\n*_bak[0-9][0-9].hiplc\n*_bak[0-9].hdalc\n*_bak[0-9][0-9].hdalc\n*.tga~\n*.kra~\n*.png~\n*.blend1\n.autosave/\n*.resources/\n\n\n\n\nContent/Asian_Village/maps/Asian_Village_Demo_BuiltData.uasset\nContent/Japanese_Temple/maps/Japanese_Temple_Demo_BuiltData.uasset\nContent/stylized_castle/maps/stylized_castle_demo_BuiltData.uasset\nContent/Underworld/Maps/Underworld_demo_BuiltData.uasset\n"
  },
  {
    "path": "HardReferenceFinder.uplugin",
    "content": "{\n\t\"FileVersion\": 3,\n\t\"Version\": 1,\n\t\"VersionName\": \"0.4.0\",\n\t\"FriendlyName\": \"HardReferenceFinder\",\n\t\"Description\": \"Plugin that shows hard referencing nodes in a blueprint graph.\",\n\t\"Category\": \"Other\",\n\t\"CreatedBy\": \"Omid Kiarostami\",\n\t\"CreatedByURL\": \"\",\n\t\"DocsURL\": \"\",\n\t\"MarketplaceURL\": \"\",\n\t\"SupportURL\": \"\",\n\t\"CanContainContent\": false,\n\t\"IsBetaVersion\": false,\n\t\"IsExperimentalVersion\": false,\n\t\"Installed\": false,\n\t\"Modules\": [\n\t\t{\n\t\t\t\"Name\": \"HardReferenceFinder\",\n\t\t\t\"Type\": \"Editor\",\n\t\t\t\"LoadingPhase\": \"PostEngineInit\"\n\t\t}\n\t]\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "Creative Commons Legal Code\n\nCC0 1.0 Universal\n\n    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE\n    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN\n    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS\n    INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES\n    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS\n    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM\n    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED\n    HEREUNDER.\n\nStatement of Purpose\n\nThe laws of most jurisdictions throughout the world automatically confer\nexclusive Copyright and Related Rights (defined below) upon the creator\nand subsequent owner(s) (each and all, an \"owner\") of an original work of\nauthorship and/or a database (each, a \"Work\").\n\nCertain owners wish to permanently relinquish those rights to a Work for\nthe purpose of contributing to a commons of creative, cultural and\nscientific works (\"Commons\") that the public can reliably and without fear\nof later claims of infringement build upon, modify, incorporate in other\nworks, reuse and redistribute as freely as possible in any form whatsoever\nand for any purposes, including without limitation commercial purposes.\nThese owners may contribute to the Commons to promote the ideal of a free\nculture and the further production of creative, cultural and scientific\nworks, or to gain reputation or greater distribution for their Work in\npart through the use and efforts of others.\n\nFor these and/or other purposes and motivations, and without any\nexpectation of additional consideration or compensation, the person\nassociating CC0 with a Work (the \"Affirmer\"), to the extent that he or she\nis an owner of Copyright and Related Rights in the Work, voluntarily\nelects to apply CC0 to the Work and publicly distribute the Work under its\nterms, with knowledge of his or her Copyright and Related Rights in the\nWork and the meaning and intended legal effect of CC0 on those rights.\n\n1. Copyright and Related Rights. A Work made available under CC0 may be\nprotected by copyright and related or neighboring rights (\"Copyright and\nRelated Rights\"). Copyright and Related Rights include, but are not\nlimited to, the following:\n\n  i. the right to reproduce, adapt, distribute, perform, display,\n     communicate, and translate a Work;\n ii. moral rights retained by the original author(s) and/or performer(s);\niii. publicity and privacy rights pertaining to a person's image or\n     likeness depicted in a Work;\n iv. rights protecting against unfair competition in regards to a Work,\n     subject to the limitations in paragraph 4(a), below;\n  v. rights protecting the extraction, dissemination, use and reuse of data\n     in a Work;\n vi. database rights (such as those arising under Directive 96/9/EC of the\n     European Parliament and of the Council of 11 March 1996 on the legal\n     protection of databases, and under any national implementation\n     thereof, including any amended or successor version of such\n     directive); and\nvii. other similar, equivalent or corresponding rights throughout the\n     world based on applicable law or treaty, and any national\n     implementations thereof.\n\n2. Waiver. To the greatest extent permitted by, but not in contravention\nof, applicable law, Affirmer hereby overtly, fully, permanently,\nirrevocably and unconditionally waives, abandons, and surrenders all of\nAffirmer's Copyright and Related Rights and associated claims and causes\nof action, whether now known or unknown (including existing as well as\nfuture claims and causes of action), in the Work (i) in all territories\nworldwide, (ii) for the maximum duration provided by applicable law or\ntreaty (including future time extensions), (iii) in any current or future\nmedium and for any number of copies, and (iv) for any purpose whatsoever,\nincluding without limitation commercial, advertising or promotional\npurposes (the \"Waiver\"). Affirmer makes the Waiver for the benefit of each\nmember of the public at large and to the detriment of Affirmer's heirs and\nsuccessors, fully intending that such Waiver shall not be subject to\nrevocation, rescission, cancellation, termination, or any other legal or\nequitable action to disrupt the quiet enjoyment of the Work by the public\nas contemplated by Affirmer's express Statement of Purpose.\n\n3. Public License Fallback. Should any part of the Waiver for any reason\nbe judged legally invalid or ineffective under applicable law, then the\nWaiver shall be preserved to the maximum extent permitted taking into\naccount Affirmer's express Statement of Purpose. In addition, to the\nextent the Waiver is so judged Affirmer hereby grants to each affected\nperson a royalty-free, non transferable, non sublicensable, non exclusive,\nirrevocable and unconditional license to exercise Affirmer's Copyright and\nRelated Rights in the Work (i) in all territories worldwide, (ii) for the\nmaximum duration provided by applicable law or treaty (including future\ntime extensions), (iii) in any current or future medium and for any number\nof copies, and (iv) for any purpose whatsoever, including without\nlimitation commercial, advertising or promotional purposes (the\n\"License\"). The License shall be deemed effective as of the date CC0 was\napplied by Affirmer to the Work. Should any part of the License for any\nreason be judged legally invalid or ineffective under applicable law, such\npartial invalidity or ineffectiveness shall not invalidate the remainder\nof the License, and in such case Affirmer hereby affirms that he or she\nwill not (i) exercise any of his or her remaining Copyright and Related\nRights in the Work or (ii) assert any associated claims and causes of\naction with respect to the Work, in either case contrary to Affirmer's\nexpress Statement of Purpose.\n\n4. Limitations and Disclaimers.\n\n a. No trademark or patent rights held by Affirmer are waived, abandoned,\n    surrendered, licensed or otherwise affected by this document.\n b. Affirmer offers the Work as-is and makes no representations or\n    warranties of any kind concerning the Work, express, implied,\n    statutory or otherwise, including without limitation warranties of\n    title, merchantability, fitness for a particular purpose, non\n    infringement, or the absence of latent or other defects, accuracy, or\n    the present or absence of errors, whether or not discoverable, all to\n    the greatest extent permissible under applicable law.\n c. Affirmer disclaims responsibility for clearing rights of other persons\n    that may apply to the Work or any use thereof, including without\n    limitation any person's Copyright and Related Rights in the Work.\n    Further, Affirmer disclaims responsibility for obtaining any necessary\n    consents, permissions or other rights required for any use of the\n    Work.\n d. Affirmer understands and acknowledges that Creative Commons is not a\n    party to this document and has no duty or obligation with respect to\n    this CC0 or use of the Work.\n"
  },
  {
    "path": "README.md",
    "content": "# Hard Reference Finder\n\nAn open-source editor plugin for Unreal Engine 5 that identifies hard references in a blueprint graph.\n\nThe plugin allows you to summon a window which links to the various function calls, variables, graph pins, etc that are causing hard package references to other assets. Results are grouped by package and sorted by size, from largest to smallest.\n\nCompatible with Unreal Engine versions 5.3, 5.2, 5.1, 5.0 and 4.27.\n\n![Image showing plugin usage in an example blueprint](Documentation/main-image.png)\n\n\n# Installation\n\n- Download the zip and unpack it (or clone this repository) to your projects *Plugins* folder.\n- Build the game with the plugin.\n- If necessary, enable the plugin from the plugins windows.\n\n# Usage\n\nOpen any blueprint with a graph or function view, then select *Window -> Hard References* from the toolbar.\n\n![Image showing how to summon the hard references viewport](Documentation/usage-guide.png)\n\n\n# Known Issues\n- After modifying a blueprint, you have to compile/save it before 'Refresh' will display the updated list of references.\n- Isn't identifying references from:\n  - function arguments\n  - properties nested in a struct\n- Note: This is still an initial version; the tool is unable to identify the source of some package references in a blueprint.  Bug reports/pull requests/methods for detecting unidentified references are appreciated.\n"
  },
  {
    "path": "Source/HardReferenceFinder/HardReferenceFinder.Build.cs",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\nusing UnrealBuildTool;\n\npublic class HardReferenceFinder : ModuleRules\n{\n\tpublic HardReferenceFinder(ReadOnlyTargetRules Target) : base(Target)\n\t{\n\t\tPCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;\n\t\t\n\t\tPublicIncludePaths.AddRange(\n\t\t\tnew string[] {\n\t\t\t\t// ... add public include paths required here ...\n\t\t\t}\n\t\t\t);\n\t\t\t\t\n\t\t\n\t\tPrivateIncludePaths.AddRange(\n\t\t\tnew string[] {\n\t\t\t\t// ... add other private include paths required here ...\n\t\t\t}\n\t\t\t);\n\t\t\t\n\t\t\n\t\tPublicDependencyModuleNames.AddRange(\n\t\t\tnew string[]\n\t\t\t{\n\t\t\t\t\"Core\",\n\t\t\t\t// ... add other public dependencies that you statically link with here ...\n\t\t\t}\n\t\t\t);\n\t\t\t\n\t\t\n\t\tPrivateDependencyModuleNames.AddRange(\n\t\t\tnew string[]\n\t\t\t{\n\t\t\t\t\"Projects\",\n\t\t\t\t\"InputCore\",\n\t\t\t\t\"UnrealEd\",\n\t\t\t\t\"ToolMenus\",\n\t\t\t\t\"CoreUObject\",\n\t\t\t\t\"Engine\",\n\t\t\t\t\"Slate\",\n\t\t\t\t\"SlateCore\",\n\t\t\t\t\"Kismet\",\n\t\t\t\t\"AssetRegistry\",\n\t\t\t\t\"BlueprintGraph\",\n\t\t\t\t\"AssetTools\",\n\t\t\t}\n\t\t\t);\n\n\t\tif (Target.Version.MajorVersion >= 5)\n\t\t{\n\t\t\tPrivateDependencyModuleNames.AddRange(\n\t\t\t\tnew string[]\n\t\t\t\t{\n\t\t\t\t\t\"SubobjectEditor\",\n\t\t\t\t});\n\t\t}\n\n\t\tif (Target.Version.MajorVersion < 5 \n\t\t|| Target.Version.MajorVersion == 5 && Target.Version.MinorVersion < 1)\n\t\t{\n\t\t\tPrivateDependencyModuleNames.AddRange(\n\t\t\t\tnew string[]\n\t\t\t\t{\n\t\t\t\t\t\"EditorStyle\", // only used in <UE5.0\n\t\t\t\t});\n\t\t}\n\t\t\n\t\tDynamicallyLoadedModuleNames.AddRange(\n\t\t\tnew string[]\n\t\t\t{\n\t\t\t\t// ... add any modules that your module loads dynamically here ...\n\t\t\t}\n\t\t\t);\n\t}\n}\n"
  },
  {
    "path": "Source/HardReferenceFinder/Private/HardReferenceFinder.cpp",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#include \"HardReferenceFinder.h\"\n#include \"HardReferenceFinderStyle.h\"\n#include \"WorkflowOrientedApp/WorkflowTabManager.h\"\n#include \"BlueprintEditor.h\"\n#include \"HardReferenceFinderSummoner.h\"\n\nstatic const FName HardReferenceFinderTabName(\"HardReferenceFinder\");\n\n#define LOCTEXT_NAMESPACE \"FHardReferenceFinderModule\"\n\nvoid FHardReferenceFinderModule::StartupModule()\n{\n\tFHardReferenceFinderStyle::Initialize();\n\tFHardReferenceFinderStyle::ReloadTextures();\n\n\tFBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>(\"Kismet\");\n\tBlueprintEditorModule.OnRegisterTabsForEditor().AddRaw(this, &FHardReferenceFinderModule::RegisterBlueprintTabs);\n}\n\nvoid FHardReferenceFinderModule::ShutdownModule()\n{\n\tFHardReferenceFinderStyle::Shutdown();\n\t\n\tFBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>(\"Kismet\");\n\tBlueprintEditorModule.OnRegisterTabsForEditor().RemoveAll(this);\n}\n\nvoid FHardReferenceFinderModule::RegisterBlueprintTabs(FWorkflowAllowedTabSet& TabFactory, FName ModeName, TSharedPtr<FBlueprintEditor> InBlueprintEditor) const\n{\n\tTabFactory.RegisterFactory(MakeShareable(new FHardReferenceFinderSummoner(InBlueprintEditor)));\n}\n\n#undef LOCTEXT_NAMESPACE\n\t\nIMPLEMENT_MODULE(FHardReferenceFinderModule, HardReferenceFinder)\n"
  },
  {
    "path": "Source/HardReferenceFinder/Private/HardReferenceFinderSearchData.cpp",
    "content": "﻿#include \"HardReferenceFinderSearchData.h\"\n#include \"AssetToolsModule.h\"\n#include \"AssetRegistry/AssetRegistryModule.h\"\n#include \"BlueprintEditor.h\"\n#include \"EdGraph/EdGraph.h\"\n#include \"K2Node_CallFunction.h\"\n#include \"K2Node_DynamicCast.h\"\n#include \"K2Node_FunctionEntry.h\"\n#include \"Kismet2/BlueprintEditorUtils.h\"\n#include \"Misc/EngineVersionComparison.h\"\n#include \"Styling/SlateIconFinder.h\"\n\n#if ENGINE_MAJOR_VERSION < 5\n#include \"SSCSEditor.h\"\n#else\n#include \"SSubobjectEditor.h\"\n#endif\n\n#define LOCTEXT_NAMESPACE \"FHardReferenceFinderModule\"\n\nTArray<FHRFTreeViewItemPtr> FHardReferenceFinderSearchData::GatherSearchData(TWeakPtr<FBlueprintEditor> BlueprintEditor)\n{\n\tReset();\n\n\tTMap<FName, FHRFTreeViewItemPtr> DependentPackageMap;\n\tFAssetRegistryModule& AssetRegistryModule = FModuleManager::Get().LoadModuleChecked<FAssetRegistryModule>(TEXT(\"AssetRegistry\"));\n\t\n\t// Get this blueprints package dependencies from the blueprint editor \n\tTArray<FName> BlueprintDependencies;\n\tGetBlueprintDependencies(BlueprintDependencies, AssetRegistryModule, BlueprintEditor);\n\t\n\t// Populate display information from package dependencies\n\t{\n\t\tTMap<FName, FAssetData> DependencyToAssetDataMap;\n\t\tGetAssetForPackages(BlueprintDependencies, DependencyToAssetDataMap);\n\n\t\tfor (auto MapIt = DependencyToAssetDataMap.CreateConstIterator(); MapIt; ++MapIt)\n\t\t{\n\t\t\tconst FName& PathName = MapIt.Key();\n\t\t\tconst FAssetData& AssetData = MapIt.Value();\n\t\t\tFString AssetTypeName = GetAssetTypeName(AssetData);\n\t\t\tFString FileName = FPaths::GetCleanFilename(PathName.ToString());\n\t\t\n\t\t\tFAssetPackageData AssetPackageData;\n\t\t\tTryGetAssetPackageData(PathName, AssetPackageData, AssetRegistryModule);\n\n\t\t\tif( FHRFTreeViewItemPtr Header = MakeShared<FHRFTreeViewItem>() )\n\t\t\t{\n\t\t\t\tHeader->bIsHeader = true;\n\t\t\t\tHeader->PackageId = PathName;\n\t\t\t\tHeader->Tooltip = FText::FromName(PathName);\n\t\t\t\tHeader->Name = FText::FromString(FileName);\n\t\t\t\tHeader->SizeOnDisk = GatherAssetSizeByName(PathName, AssetRegistryModule);\n\t\t\t\tHeader->SlateIcon = FSlateIcon(\"EditorStyle\", FName( *(\"ClassIcon.\" + AssetTypeName))); \n\n\t\t\t\tFAssetToolsModule& AssetToolsModule = FModuleManager::LoadModuleChecked<FAssetToolsModule>(TEXT(\"AssetTools\"));\t\n\t\t\t\tif (UClass* AssetClass = AssetData.GetClass())\n\t\t\t\t{\n\t\t\t\t\tTWeakPtr<IAssetTypeActions> AssetTypeActions = AssetToolsModule.Get().GetAssetTypeActionsForClass(AssetData.GetClass());\n\t\t\t\t\tif(AssetTypeActions.IsValid())\n\t\t\t\t\t{\n\t\t\t\t\t\tHeader->IconColor = AssetTypeActions.Pin()->GetTypeColor();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tDependentPackageMap.Add(PathName, Header);\n\t\t\t\tTreeView.Add(Header);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t{\n\t\t// Search through blueprint nodes for references to the dependent packages\n\t\tif( UBlueprint* Blueprint = BlueprintEditor.Pin()->GetBlueprintObj() )\n\t\t{\n\t\t\tSearchGraphNodes(DependentPackageMap, AssetRegistryModule, Blueprint->UbergraphPages);\n\t\t\tSearchFunctionReferences(DependentPackageMap, AssetRegistryModule, Blueprint);\n\t\t\tSearchBlueprintClassProperties(DependentPackageMap, AssetRegistryModule, Blueprint);\n\t\t\tSearchSimpleConstructionScript(DependentPackageMap, AssetRegistryModule, Blueprint);\n\t\t}\n\t}\n\n\t// If we didn't discover any references to a package make a note\n\tfor(FHRFTreeViewItemPtr HeaderItem : TreeView)\n\t{\n\t\tif(HeaderItem->Children.Num() <= 0)\n\t\t{\n\t\t\tFHRFTreeViewItemPtr ChildItem = MakeShared<FHRFTreeViewItem>();\n\t\t\tHeaderItem->Children.Add(ChildItem);\n\t\t\tChildItem->Name = LOCTEXT(\"UnknownSource\", \"Unidentified source\");\n\t\t\tChildItem->Tooltip = LOCTEXT(\"UnknownSourceTooltip\", \"This package is being referenced but the plugin is unable to identify its source.\");\n\t\t}\n\t}\n\t\n\t// sort from largest to smallest\n\tTreeView.Sort([](FHRFTreeViewItemPtr Lhs, FHRFTreeViewItemPtr Rhs)\n\t{\n\t\treturn Lhs->SizeOnDisk > Rhs->SizeOnDisk;\n\t});\n\t\n\treturn TreeView;\n}\n\nvoid FHardReferenceFinderSearchData::Reset()\n{\n\tTreeView.Reset();\n}\n\nUObject* FHardReferenceFinderSearchData::GetObjectContext(TWeakPtr<FBlueprintEditor> BlueprintEditor) const\n{\n\tif(!BlueprintEditor.IsValid())\n\t{\n\t\treturn nullptr;\n\t}\n\n\tclass BlueprintEditorEditingObject_AccessHack : public FBlueprintEditor\n\t{\n\tpublic:\n\t\tUObject* GetEditingObject_Expose() const { return GetEditingObject(); }\n\t};\n\treturn static_cast<BlueprintEditorEditingObject_AccessHack*>(BlueprintEditor.Pin().Get())->GetEditingObject_Expose();\n}\n\nvoid FHardReferenceFinderSearchData::GetBlueprintDependencies(TArray<FName>& OutPackageDependencies, FAssetRegistryModule& AssetRegistryModule, TWeakPtr<FBlueprintEditor> BlueprintEditor) const\n{\n\tUObject* Object = GetObjectContext(BlueprintEditor);\n\tif(Object == nullptr)\n\t{\n\t\treturn;\n\t}\n\t\n\tFAssetData ExistingAsset = GetAssetDataForObject(Object);\n\n\tUE::AssetRegistry::FDependencyQuery Flags(UE::AssetRegistry::EDependencyQuery::Hard);\n\tAssetRegistryModule.GetDependencies(ExistingAsset.PackageName, OutPackageDependencies, UE::AssetRegistry::EDependencyCategory::Package, Flags);\n}\n\nvoid FHardReferenceFinderSearchData::SearchGraphNodes(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const FEdGraphArray& EdGraphList) const\n{\n\tfor(UEdGraph* Graph : EdGraphList)\n\t{\n\t\tif(Graph)\n\t\t{\n\t\t\tfor (UEdGraphNode* Node : Graph->Nodes)\n\t\t\t{\n\t\t\t\tconst UPackage* FunctionPackage = nullptr;\n\t\t\t\tif(const UK2Node_CallFunction* CallFunctionNode = Cast<UK2Node_CallFunction>(Node))\n\t\t\t\t{\n\t\t\t\t\tFunctionPackage = CallFunctionNode->FunctionReference.GetMemberParentPackage();\n\t\t\t\t}\n\t\t\t\telse if(const UK2Node_DynamicCast* CastNode = Cast<UK2Node_DynamicCast>(Node))\n\t\t\t\t{\n\t\t\t\t\tif(CastNode->TargetType)\n\t\t\t\t\t{\n\t\t\t\t\t\tFunctionPackage = CastNode->TargetType->GetPackage();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( const FHRFTreeViewItemPtr Result = CheckAddPackageResult(OutPackageMap, AssetRegistryModule, FunctionPackage) )\n\t\t\t\t{\n\t\t\t\t\tResult->Name = Node->GetNodeTitle(ENodeTitleType::ListView);\n\t\t\t\t\tResult->NodeGuid = Node->NodeGuid;\n\t\t\t\t\tResult->SlateIcon = Node->GetIconAndTint(Result->IconColor);\n\t\t\t\t}\n\n\t\t\t\t// Also search the pins of this node for any references to other packages, e.g. the 'Class' pin of a SpawnActor node.\n\t\t\t\tSearchNodePins(OutPackageMap, AssetRegistryModule, Node);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid FHardReferenceFinderSearchData::SearchNodePins(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UEdGraphNode* Node) const\n{\n\tif(Node == nullptr)\n\t{\n\t\treturn;\n\t}\n\t\n\tfor(const UEdGraphPin* Pin : Node->Pins)\n\t{\n\t\tif(Pin->bHidden)\n\t\t{\n\t\t\t// skip hidden pins\n\t\t\tcontinue;\n\t\t}\n\t\t\t\t\t\n\t\tif(Pin->Direction == EGPD_Input)\n\t\t{\n\t\t\tif(const UObject* PinObject = Pin->DefaultObject)\n\t\t\t{\n\t\t\t\tconst UPackage* FunctionPackage = PinObject->GetPackage();\n\t\t\t\tif( const FHRFTreeViewItemPtr Result = CheckAddPackageResult(OutPackageMap, AssetRegistryModule, FunctionPackage) )\n\t\t\t\t{\n\t\t\t\t\tResult->Name = FText::Format(LOCTEXT(\"FunctionInput\",\"{0} ({1})\"), FText::FromString(Pin->GetName()), Node->GetNodeTitle(ENodeTitleType::ListView));\n\t\t\t\t\tResult->NodeGuid = Node->NodeGuid;\n\t\t\t\t\tif( const UEdGraphSchema* Schema = Pin->GetSchema() )\n\t\t\t\t\t{\n\t\t\t\t\t\tResult->IconColor = Schema->GetPinTypeColor(Pin->PinType);\n\t\t\t\t\t}\n\t\t\t\t\tResult->SlateIcon = FSlateIcon(\"EditorStyle\", \"Graph.Pin.Disconnected_VarA\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid FHardReferenceFinderSearchData::SearchFunctionReferences(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UBlueprint* Blueprint) const\n{\n\t// @heyomidk This method is still imperfect as there are a number of ways references can be formed from functions\n\t//\t\t1. From graph nodes inside the function (Cast, etc)\n\t//\t\t2. From Local Variables inside the function\n\t//\t\t\ta. Due to the variables type (ex: class is Blueprint)\n\t//\t\t\tb. Due to the default value (ie Subclass of UObject but points to a Blueprint)\n\t//\t\t3. From arguments to a function\n\t//\t\t\ta. Due to the type of an input argument\n\t//\t\t\tb. Due to the type of an output argument\n\t//\t\t\tc. Due to the default value of an output argument\n\t//\n\t// Note that the UFunction* provided by a TFieldRange iterator accounts for reference types 2a/2b, while the cached\n\t// UFunction* in an EdGraphNode finds 2a but not 2b\n\t//\n\t// Note that neither method identifies all type 3 references so this approach may need to be amended/revised\n\n\t// This gathers type 1/3c references and creates links to the associated graph nodes.\n\tSearchGraphNodes(OutPackageMap, AssetRegistryModule, Blueprint->FunctionGraphs);\n\n\t// This gathers type 2 references and links them to the function entry node\n\tfor( UFunction* Function : TFieldRange<UFunction>(Blueprint->GeneratedClass, EFieldIteratorFlags::ExcludeSuper) )\n\t{\n\t\tconst UK2Node_FunctionEntry* GraphEntryNode = FindGraphNodeForFunction(Blueprint, Function);\n\t\tif(GraphEntryNode)\n\t\t{\n\t\t\tfor( const UObject* ReferencedObject : Function->ScriptAndPropertyObjectReferences)\n\t\t\t{\n\t\t\t\tconst UPackage* Package = ReferencedObject->GetPackage();\n\t\t\t\tif( const FHRFTreeViewItemPtr Result = CheckAddPackageResult(OutPackageMap, AssetRegistryModule, Package) )\n\t\t\t\t{\n\t\t\t\t\tResult->Name = FText::Format(LOCTEXT(\"FunctionReference\",\"{0}\"), GraphEntryNode->GetNodeTitle(ENodeTitleType::ListView));\n\t\t\t\t\tResult->NodeGuid = GraphEntryNode->NodeGuid;\n\t\t\t\t\tResult->SlateIcon = GraphEntryNode->GetIconAndTint(Result->IconColor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid FHardReferenceFinderSearchData::SearchSimpleConstructionScript(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UBlueprint* Blueprint) const\n{\n\tconst USimpleConstructionScript* SimpleConstructionScript = Blueprint->SimpleConstructionScript;\n\tif(SimpleConstructionScript == nullptr)\n\t{\n\t\treturn;\n\t}\n\t\n\tconst TArray<USCS_Node*>& RootNodes = SimpleConstructionScript->GetAllNodes();\n\tfor(const USCS_Node* SCSNode : RootNodes)\n\t{\n\t\tif(SCSNode == nullptr)\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst FName VarName = SCSNode->GetVariableName();\n\t\t\n\t\tTSet<UPackage*> OutReferencedPackages;\n\t\tFindPackagesInSCSNode(OutReferencedPackages, SCSNode);\n\n\t\tfor(const UPackage* Package : OutReferencedPackages)\n\t\t{\n\t\t\tif(const FHRFTreeViewItemPtr Result = CheckAddPackageResult(OutPackageMap, AssetRegistryModule, Package))\n\t\t\t{\n\t\t\t\tResult->SlateIcon = FSlateIconFinder::FindIconForClass(SCSNode->ComponentClass, TEXT(\"SCS.Component\"));\n\t\t\t\tResult->Name = FText::Format(LOCTEXT(\"ComponentReference\", \"{0}\"), FText::FromName(VarName));\n\t\t\t\tResult->SCSIdentifier = SCSNode->GetFName();\n\t\t\t}\n\t\t}\n\t}\n}\n\nUK2Node_FunctionEntry* FHardReferenceFinderSearchData::FindGraphNodeForFunction(const UBlueprint* Blueprint, UFunction* FunctionToFind) const\n{\n\tif(Blueprint == nullptr)\n\t{\n\t\treturn nullptr;\n\t}\n\t\n\tif(FunctionToFind == nullptr)\n\t{\n\t\treturn nullptr;\n\t}\n\n\t// search functions in the Graph\n\tfor(UEdGraph* Graph : Blueprint->FunctionGraphs)\n\t{\n\t\t// find the entry point for the function in the graph\n\t\tUK2Node_FunctionEntry* GraphEntryNode = nullptr;\n\t\tfor(UEdGraphNode* Node : Graph->Nodes)\n\t\t{\n\t\t\tGraphEntryNode = Cast<UK2Node_FunctionEntry>(Node);\n\t\t\tif(GraphEntryNode != nullptr)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tif(GraphEntryNode)\n\t\t{\n\t\t\t// See if this matches the provided UFunction\n\t\t\tconst TSharedPtr<FStructOnScope> NodeFunctionVarCache = GraphEntryNode->GetFunctionVariableCache();\n\t\t\tif( NodeFunctionVarCache.IsValid() )\n\t\t\t{\n\t\t\t\tif( const UFunction* NodeFunction = Cast<UFunction>(NodeFunctionVarCache->GetStruct()) )\n\t\t\t\t{\n\t\t\t\t\tconst FName NodeFunctionName = NodeFunction->GetFName(); \n\t\t\t\t\tconst FName TargetFunctionName = FunctionToFind->GetFName();\n\t\t\t\t\tif(NodeFunctionName == TargetFunctionName)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn GraphEntryNode;\n\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn nullptr;\n}\n\nvoid FHardReferenceFinderSearchData::FindPackagesInSCSNode(TSet<UPackage*>& OutReferencedPackages, const USCS_Node* SCSNode) const\n{\n\tif(SCSNode==nullptr || SCSNode->ComponentClass == nullptr)\n\t{\n\t\treturn;\n\t}\n\n\tif( UPackage* NodePackage = SCSNode->ComponentClass->GetPackage() )\n\t{\n\t\tif(NodePackage)\n\t\t{\n\t\t\tOutReferencedPackages.Add(NodePackage);\n\t\t}\n\t}\n\t\n\tfor( const FProperty* Property : TFieldRange<FProperty>(SCSNode->ComponentClass, EFieldIteratorFlags::IncludeSuper))\n\t{\n\t\tFSlateIcon VariableTypeIcon;\n\t\tTArray<UPackage*> ReferencedPackages = FindPackagesForProperty(VariableTypeIcon, SCSNode->ComponentTemplate, Property );\n\t\tfor(UPackage* Package : ReferencedPackages)\n\t\t{\n\t\t\tOutReferencedPackages.Add(Package);\n\t\t}\n\t}\n}\n\nTArray<UPackage*> FHardReferenceFinderSearchData::FindPackagesForProperty(FSlateIcon& OutResultIcon, const UObject* ContainerPtr, const FProperty* TargetProperty) const\n{\n\tTArray<UPackage*> FoundPackages;\n\n\tif(TargetProperty == nullptr)\n\t{\n\t\treturn FoundPackages;\n\t}\n\t\n\tif(ContainerPtr != nullptr)\n\t{\n\t\tTArray<const FStructProperty*> EncounteredStructProps;\n\t\tconst EPropertyObjectReferenceType ReferenceType = EPropertyObjectReferenceType::Strong;\n\t\tconst bool bHasStrongReferences = TargetProperty->ContainsObjectReference(EncounteredStructProps, ReferenceType);\n\t\tif(bHasStrongReferences)\n\t\t{\n\t\t\tconst void* TargetPropertyAddress = TargetProperty->ContainerPtrToValuePtr<void>(ContainerPtr);\n\n\t\t\tstruct PropertyAndAddressTuple\n\t\t\t{\n\t\t\t\tconst FProperty* Property = nullptr;\n\t\t\t\tconst void* ValueAddress = nullptr;\n\t\t\t};\n\t\t\tTArray<PropertyAndAddressTuple> PropertiesToExamine;\n\n\t\t\tif(const FArrayProperty* ArrayProperty = CastField<FArrayProperty>(TargetProperty))\n\t\t\t{\n\t\t\t\tOutResultIcon = FSlateIcon(\"EditorStyle\", \"Kismet.VariableList.ArrayTypeIcon\");\n\t\t\t\tFScriptArrayHelper ArrayHelper(ArrayProperty, TargetPropertyAddress);\n\t\t\t\tfor(int i=0; i<ArrayHelper.Num(); ++i)\n\t\t\t\t{\n\t\t\t\t\tPropertiesToExamine.Add({ArrayProperty->Inner, ArrayHelper.GetRawPtr(i)});\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(const FSetProperty* SetProperty = CastField<FSetProperty>(TargetProperty))\n\t\t\t{\n\t\t\t\tOutResultIcon = FSlateIcon(\"EditorStyle\", \"Kismet.VariableList.SetTypeIcon\");\n\t\t\t\tFScriptSetHelper SetHelper(SetProperty, TargetPropertyAddress);\n\t\t\t\tfor(int i=0; i<SetHelper.Num(); ++i)\n\t\t\t\t{\n\t\t\t\t\tPropertiesToExamine.Add({SetHelper.GetElementProperty(), SetHelper.GetElementPtr(i)});\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(const FMapProperty* MapProperty = CastField<FMapProperty>(TargetProperty))\n\t\t\t{\n\t\t\t\tOutResultIcon = FSlateIcon(\"EditorStyle\", \"Kismet.VariableList.MapValueTypeIcon\");\n\t\t\t\tFScriptMapHelper MapHelper(MapProperty, TargetPropertyAddress);\n\t\t\t\tfor(int i=0; i<MapHelper.Num(); ++i)\n\t\t\t\t{\n\t\t\t\t\tPropertiesToExamine.Add({MapHelper.GetKeyProperty(), MapHelper.GetKeyPtr(i)});\n\t\t\t\t\tPropertiesToExamine.Add({MapHelper.GetValueProperty(), MapHelper.GetValuePtr(i)});\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tOutResultIcon = FSlateIcon(\"EditorStyle\", \"Kismet.VariableList.TypeIcon\");\n\t\t\t\tPropertiesToExamine.Add({TargetProperty, TargetPropertyAddress});\n\t\t\t}\n\n\t\t\tfor (const PropertyAndAddressTuple& Tuple : PropertiesToExamine)\n\t\t\t{\n\t\t\t\tif( const FObjectPropertyBase* ObjectProperty = CastField<FObjectPropertyBase>(Tuple.Property) )\n\t\t\t\t{\n\t\t\t\t\tif(const UObject* Object = ObjectProperty->GetObjectPropertyValue(Tuple.ValueAddress))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(UPackage* Package = Object->GetPackage())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tFoundPackages.AddUnique(Package);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n#if UE_VERSION_OLDER_THAN(5,3,0)\n\ttypedef const TArray<UObject*>* FObjectArray;\n#else\n\ttypedef const TArray<TObjectPtr<UObject>>* FObjectArray;\n#endif\n\tFObjectArray ScriptAndPropertyObjectReferences = nullptr;\n\tif(const FObjectPropertyBase* ObjectProperty = CastField<FObjectPropertyBase>(TargetProperty))\n\t{\n\t\tScriptAndPropertyObjectReferences = &ObjectProperty->PropertyClass->ScriptAndPropertyObjectReferences;\n\t\tif(ObjectProperty->PropertyClass)\n\t\t{\n\t\t\tif(UPackage* Package = ObjectProperty->PropertyClass->GetPackage())\n\t\t\t{\n\t\t\t\tFoundPackages.AddUnique(Package);\n\t\t\t}\n\t\t}\n\t}\n\telse if(const FStructProperty* StructProperty = CastField<FStructProperty>(TargetProperty))\n\t{\n\t\tScriptAndPropertyObjectReferences = &StructProperty->Struct->ScriptAndPropertyObjectReferences;\n\t}\n\n\tif(ScriptAndPropertyObjectReferences)\n\t{\n\t\tfor(const UObject* ObjectReference : *ScriptAndPropertyObjectReferences)\n\t\t{\n\t\t\tif(ObjectReference)\n\t\t\t{\n\t\t\t\tif(UPackage* Package = ObjectReference->GetPackage())\n\t\t\t\t{\n\t\t\t\t\tFoundPackages.AddUnique(Package);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn FoundPackages;\n}\n\nvoid FHardReferenceFinderSearchData::SearchBlueprintClassProperties(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap,\tconst FAssetRegistryModule& AssetRegistryModule, UBlueprint* Blueprint) const\n{\n\tfor( FProperty* Property : TFieldRange<FProperty>(Blueprint->GeneratedClass, EFieldIteratorFlags::ExcludeSuper))\n\t{\n\t\tUBlueprint* FoundBlueprint = nullptr;\n\t\tconst FName VarName = Property->GetFName();\n\t\tconst int32 VarIndex = FBlueprintEditorUtils::FindNewVariableIndexAndBlueprint(Blueprint, VarName, FoundBlueprint);\n\t\tconst bool bIsVar = VarIndex != INDEX_NONE;\n\t\t\n\t\tbool bSkipProperty = false;\n\t\tif(!bIsVar)\n\t\t{\n\t\t\tif(const FObjectPropertyBase* ObjectProperty = CastField<FObjectPropertyBase>(Property))\n\t\t\t{\n\t\t\t\tconst bool bIsActorComponentClass = ObjectProperty->PropertyClass->IsChildOf(UActorComponent::StaticClass());\n\t\t\t\tif(bIsActorComponentClass)\n\t\t\t\t{\n\t\t\t\t\t// Actor components aren't initialized in the CDO so parsing them here isn't exhaustive.\n\t\t\t\t\t// SearchSimpleConstructionScript() handles these, so skip these properties here. \n\t\t\t\t\tbSkipProperty = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!bSkipProperty)\n\t\t{\n\t\t\tFSlateIcon ResultIcon;\n\t\t\tTArray<UPackage*> ReferencedPackages = FindPackagesForProperty(ResultIcon, Blueprint->GeneratedClass->GetDefaultObject(), Property); \n\n\t\t\tfor(const UPackage* Package : ReferencedPackages)\n\t\t\t{\n\t\t\t\tif(const FHRFTreeViewItemPtr Result = CheckAddPackageResult(OutPackageMap, AssetRegistryModule, Package))\n\t\t\t\t{\n\t\t\t\t\tif(bIsVar)\n\t\t\t\t\t{\n\t\t\t\t\t\tconst FBPVariableDescription& Description = Blueprint->NewVariables[VarIndex];\n\t\t\t\t\t\tif( UEdGraphSchema_K2 const* Schema = GetDefault<UEdGraphSchema_K2>() )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tResult->IconColor = Schema->GetPinTypeColor(Description.VarType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tResult->SlateIcon = ResultIcon;\n\t\t\t\t\t\tResult->Name = FText::Format(LOCTEXT(\"MemberVariable\",\"{0} (Member Variable)\"), FText::FromName(Description.VarName));\n\t\t\t\t\t\tResult->Tooltip = LOCTEXT(\"MemberVariableTooltip\",\"Blueprint member variable\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tResult->SlateIcon = ResultIcon;\n\t\t\t\t\t\tResult->Name = FText::Format(LOCTEXT(\"OtherPropertyName\", \"{0}\"), FText::FromName(VarName));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nFHRFTreeViewItemPtr FHardReferenceFinderSearchData::CheckAddPackageResult(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UPackage* Package) const\n{\n\tif( Package )\n\t{\n\t\tconst FName PackageName = Package->GetFName();\n\t\tif(const FHRFTreeViewItemPtr* FoundHeader = OutPackageMap.Find(PackageName))\n\t\t{\n\t\t\tconst FHRFTreeViewItemPtr Header = *FoundHeader;\n\t\t\t\t\t\t\t\t\n\t\t\tFAssetPackageData AssetPackageData;\n\t\t\tconst bool bExists = TryGetAssetPackageData(PackageName, AssetPackageData, AssetRegistryModule);\n\t\t\tif(ensure(bExists))\n\t\t\t{\n\t\t\t\tFHRFTreeViewItemPtr Link = MakeShared<FHRFTreeViewItem>();\n\t\t\t\tHeader->Children.Add(Link);\n\t\t\t\treturn Link; \n\t\t\t}\n\t\t}\n\t}\n\n\treturn  nullptr;\n}\n\nvoid FHardReferenceFinderSearchData::GetAssetForPackages(const TArray<FName>& PackageNames, TMap<FName, FAssetData>& OutPackageToAssetData) const\n{\n#if ENGINE_MAJOR_VERSION < 5\n\t\tFAssetRegistryModule& AssetRegistryModule = FModuleManager::Get().LoadModuleChecked<FAssetRegistryModule>(TEXT(\"AssetRegistry\"));\n\tFARFilter Filter;\n\tfor ( auto PackageIt = PackageNames.CreateConstIterator(); PackageIt; ++PackageIt )\n\t{\n\t\tconst FString& PackageName = (*PackageIt).ToString();\n\t\tFilter.PackageNames.Add(*PackageIt);\n\t}\n\n\tTArray<FAssetData> AssetDataList;\n\tAssetRegistryModule.Get().GetAssets(Filter, AssetDataList);\n\tfor ( auto AssetIt = AssetDataList.CreateConstIterator(); AssetIt; ++AssetIt )\n\t{\n\t\tOutPackageToAssetData.Add((*AssetIt).PackageName, *AssetIt);\n\t}\n#else\n\tUE::AssetRegistry::GetAssetForPackages(PackageNames, OutPackageToAssetData);\n#endif\n}\n\nbool FHardReferenceFinderSearchData::TryGetAssetPackageData(FName PathName, FAssetPackageData& OutPackageData, const FAssetRegistryModule& AssetRegistryModule) const\n{\n#if UE_VERSION_OLDER_THAN(5, 0, 0)\n\tif(const FAssetPackageData* pAssetPackageData = AssetRegistryModule.Get().GetAssetPackageData(PathName))\n\t{\n\t\tOutPackageData = *pAssetPackageData;\n\t\treturn true;\n\t}\n#elif UE_VERSION_OLDER_THAN(5, 1, 0)\n\tconst TOptional<FAssetPackageData> pAssetPackageData = AssetRegistryModule.Get().GetAssetPackageDataCopy(PathName);\n\tif (pAssetPackageData.IsSet())\n\t{\n\t\tOutPackageData = pAssetPackageData.GetValue();\n\t\treturn true;\n\t}\n#else\n\tconst UE::AssetRegistry::EExists Result = AssetRegistryModule.TryGetAssetPackageData(PathName, OutPackageData);\n\tif(Result == UE::AssetRegistry::EExists::Exists)\n\t{\n\t\treturn true;\n\t}\n#endif\n\treturn false;\n}\n\nFString FHardReferenceFinderSearchData::GetAssetTypeName(const FAssetData& AssetData) const\n{\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n\treturn AssetData.AssetClass.ToString();\n#else\n\treturn AssetData.AssetClassPath.GetAssetName().ToString();\n#endif\n}\n\nFAssetData FHardReferenceFinderSearchData::GetAssetDataForObject(const UObject* Object) const\n{\n\tFAssetRegistryModule& AssetRegistryModule = FModuleManager::Get().LoadModuleChecked<FAssetRegistryModule>(TEXT(\"AssetRegistry\"));\n\tFString ObjectPath = Object->GetPathName();\n\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n\treturn AssetRegistryModule.Get().GetAssetByObjectPath(*ObjectPath);\n#else\n\treturn AssetRegistryModule.Get().GetAssetByObjectPath(FSoftObjectPath(ObjectPath));\n#endif\n}\n\nint64 FHardReferenceFinderSearchData::GatherAssetSizeByName(const FName& AssetName, FAssetRegistryModule& AssetRegistryModule) const\n{\n\tTSet<FName> Visited;\n\tconst int64 Size = GatherAssetSizeRecursive(AssetName, Visited, AssetRegistryModule);\n\treturn Size;\n}\n\nint64 FHardReferenceFinderSearchData::GatherAssetSizeRecursive(const FName& AssetName, TSet<FName>& OutVisited, FAssetRegistryModule& AssetRegistryModule) const\n{\n\tconst bool bAlreadyVisited = OutVisited.Contains(AssetName);\n\tif(bAlreadyVisited)\n\t{\n\t\treturn 0;\n\t}\n\tOutVisited.Add(AssetName);\n\n\tint64 AssetSize = 0;\n\tFAssetPackageData AssetPackageData;\n\tif( TryGetAssetPackageData(AssetName, AssetPackageData, AssetRegistryModule) )\n\t{\n\t\tAssetSize += AssetPackageData.DiskSize;\n\t}\n\t\n\tTArray<FName> Dependencies;\n\tconst UE::AssetRegistry::FDependencyQuery Flags(UE::AssetRegistry::EDependencyQuery::Hard);\n\tAssetRegistryModule.GetDependencies(AssetName, Dependencies, UE::AssetRegistry::EDependencyCategory::Package, Flags);\n\tint64 DependencySize = 0;\t\n\tfor(const FName& DependencyName : Dependencies)\n\t{\n\t\tDependencySize += GatherAssetSizeRecursive(DependencyName, OutVisited, AssetRegistryModule);  \n\t}\n\n\tconst int64 TotalSize = AssetSize + DependencySize; \n\treturn TotalSize;\n}\n\n#undef LOCTEXT_NAMESPACE\n"
  },
  {
    "path": "Source/HardReferenceFinder/Private/HardReferenceFinderStyle.cpp",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#include \"HardReferenceFinderStyle.h\"\n#include \"Styling/SlateStyleRegistry.h\"\n#include \"Framework/Application/SlateApplication.h\"\n#include \"Slate/SlateGameResources.h\"\n#include \"Interfaces/IPluginManager.h\"\n\n#define RootToContentDir Style->RootToContentDir\n\nTSharedPtr<FSlateStyleSet> FHardReferenceFinderStyle::StyleInstance = nullptr;\n\nvoid FHardReferenceFinderStyle::Initialize()\n{\n\tif (!StyleInstance.IsValid())\n\t{\n\t\tStyleInstance = Create();\n\t\tFSlateStyleRegistry::RegisterSlateStyle(*StyleInstance);\n\t}\n}\n\nvoid FHardReferenceFinderStyle::Shutdown()\n{\n\tFSlateStyleRegistry::UnRegisterSlateStyle(*StyleInstance);\n\tensure(StyleInstance.IsUnique());\n\tStyleInstance.Reset();\n}\n\nFName FHardReferenceFinderStyle::GetStyleSetName()\n{\n\tstatic FName StyleSetName(TEXT(\"HardReferenceFinderStyle\"));\n\treturn StyleSetName;\n}\n\nconst FVector2D Icon16x16(16.0f, 16.0f);\nconst FVector2D Icon20x20(20.0f, 20.0f);\n\nTSharedRef< FSlateStyleSet > FHardReferenceFinderStyle::Create()\n{\n\tTSharedRef< FSlateStyleSet > Style = MakeShareable(new FSlateStyleSet(\"HardReferenceFinderStyle\"));\n\tStyle->SetContentRoot(IPluginManager::Get().FindPlugin(\"HardReferenceFinder\")->GetBaseDir() / TEXT(\"Resources\"));\n\n\n\treturn Style;\n}\n\nvoid FHardReferenceFinderStyle::ReloadTextures()\n{\n\tif (FSlateApplication::IsInitialized())\n\t{\n\t\tFSlateApplication::Get().GetRenderer()->ReloadTextureResources();\n\t}\n}\n\nconst ISlateStyle& FHardReferenceFinderStyle::Get()\n{\n\treturn *StyleInstance;\n}\n"
  },
  {
    "path": "Source/HardReferenceFinder/Private/HardReferenceFinderSummoner.cpp",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#include \"HardReferenceFinderSummoner.h\"\n#include \"HardReferenceFinderStyle.h\"\n#include \"BlueprintEditor.h\"\n#include \"SHardReferenceFinderWindow.h\"\n\n#define LOCTEXT_NAMESPACE \"FHardReferenceFinderModule\"\n\nstatic const FName HardReferenceFinderID( TEXT( \"HardReferenceFinder\") );\n\nFHardReferenceFinderSummoner::FHardReferenceFinderSummoner(TSharedPtr<FAssetEditorToolkit> InHostingApp)\n\t: FWorkflowTabFactory(HardReferenceFinderID, InHostingApp)\n{\n\tTabLabel = LOCTEXT(\"HardReferenceFinderTabTitle\", \"Hard References\");\n\tTabIcon = FSlateIcon(\"EditorStyle\",\"ContentBrowser.ReferenceViewer\");\n\n\tbIsSingleton = true;\n\n\tViewMenuDescription = LOCTEXT(\"HardReferenceFinderView\", \"Hard Reference Viewer\");\n\tViewMenuTooltip = LOCTEXT(\"HardReferenceFinderView_ToolTip\", \"Shows hard referencing nodes associated with this Blueprint\");\n}\n\nTSharedRef<SWidget> FHardReferenceFinderSummoner::CreateTabBody(const FWorkflowTabSpawnInfo& Info) const\n{\n\tconst TSharedPtr<FBlueprintEditor> BlueprintEditorPtr = StaticCastSharedPtr<FBlueprintEditor>(HostingApp.Pin());\n\treturn SNew(SHardReferenceFinderWindow, BlueprintEditorPtr);\t\n}\n\nFText FHardReferenceFinderSummoner::GetTabToolTipText(const FWorkflowTabSpawnInfo& Info) const\n{\n\treturn LOCTEXT(\"TabTooltip\", \"Shows the hard referencing nodes in this Blueprint\");\n}\n\n#undef LOCTEXT_NAMESPACE\n"
  },
  {
    "path": "Source/HardReferenceFinder/Private/SHardReferenceFinderWindow.cpp",
    "content": "﻿\n#include \"SHardReferenceFinderWindow.h\"\n#include \"BlueprintEditor.h\"\n#include \"BlueprintEditorTabs.h\"\n#include \"GraphEditorSettings.h\"\n#include \"HardReferenceFinderSearchData.h\"\n#include \"Engine/SCS_Node.h\"\n#include \"Engine/SimpleConstructionScript.h\"\n#include \"Kismet2/BlueprintEditorUtils.h\"\n#include \"Kismet2/KismetEditorUtilities.h\"\n#include \"Misc/EngineVersionComparison.h\"\n#include \"Widgets/Input/SButton.h\"\n\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n#include \"EditorStyleSet.h\"\n#endif\n\n#define LOCTEXT_NAMESPACE \"FHardReferenceFinderModule\"\n\nnamespace HardReferenceInternals\n{\n\tstatic FText MakeBestSizeString(const SIZE_T SizeInBytes)\n\t{\n\t\tFText SizeText;\n\n\t\tif (SizeInBytes < 1000)\n\t\t{\n\t\t\t// We ended up with bytes, so show a decimal number\n\t\t\tSizeText = FText::AsMemory(SizeInBytes, EMemoryUnitStandard::SI);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Show a fractional number with the best possible units\n\t\t\tFNumberFormattingOptions NumberFormattingOptions;\n\t\t\tNumberFormattingOptions.MaximumFractionalDigits = 1;\n\t\t\tNumberFormattingOptions.MinimumFractionalDigits = 0;\n\t\t\tNumberFormattingOptions.MinimumIntegralDigits = 1;\n\n\t\t\tSizeText = FText::AsMemory(SizeInBytes, &NumberFormattingOptions, nullptr, EMemoryUnitStandard::SI);\n\t\t}\n\n\t\treturn SizeText;\n\t}\t\n}\n\nvoid SHardReferenceFinderWindow::Construct(const FArguments& InArgs, TSharedPtr<FBlueprintEditor> InBlueprintGraph)\n{\n\tBlueprintGraph = InBlueprintGraph;\n\t\n\tChildSlot[\n\t\tSNew(SVerticalBox)\n\t\t+ SVerticalBox::Slot()\n\t\t.AutoHeight()\n\t\t.Padding(10.f)\n\t\t[\n\t\t\tSNew(SHorizontalBox)\n\t\t\t+SHorizontalBox::Slot()\n\t\t\t.Padding(8.f,4.f)\n\t\t\t.VAlign(VAlign_Center)\n\t\t\t[\n\t\t\t\tSAssignNew(HeaderText, STextBlock)\n\t\t\t]\n\t\t\t+SHorizontalBox::Slot()\n\t\t\t.AutoWidth()\n\t\t\t.HAlign(HAlign_Right)\n\t\t\t.Padding(0.f, 0.0f)\n\t\t\t[\n\t\t\t\tSNew(SButton)\n\t\t\t\t.OnClicked(this, &SHardReferenceFinderWindow::OnRefreshClicked)\n\t\t\t\t[\n\t\t\t\t\tSNew(SHorizontalBox)\n\t\t\t\t\t+ SHorizontalBox::Slot()\n\t\t\t\t\t.HAlign(HAlign_Center)\n\t\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t\t.Padding(0.,3.f)\n\t\t\t\t\t.AutoWidth()\n\t\t\t\t\t[\n\t\t\t\t\t\tSNew(SImage)\n\t\t\t\t\t\t.Image(GetBrush_RefreshIcon())\n\t\t\t\t\t]\n\t\t\t\t\t+ SHorizontalBox::Slot()\n\t\t\t\t\t.Padding(FMargin(8., 0, 0, 0))\n\t\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t\t.AutoWidth()\n\t\t\t\t\t[\n\t\t\t\t\t\tSNew(STextBlock)\n\t\t\t\t\t\t.Text(LOCTEXT(\"Refresh\", \"Refresh\"))\n\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t]\n\t\t]\n\t\t+ SVerticalBox::Slot()\n\t\t[\n\t\t\tSNew(SBorder)\n\t\t\t.BorderImage(GetBrush_MenuBackground())\n\t\t\t.Padding(FMargin(8.f, 8.f, 4.f, 0.f))\n\t\t\t[\n\t\t\t\tSAssignNew(TreeView, SHRFTreeType)\n\t\t\t\t.TreeItemsSource(&TreeViewData)\n\t\t\t\t.OnGetChildren(this, &SHardReferenceFinderWindow::OnGetChildren)\n\t\t\t\t.OnGenerateRow(this, &SHardReferenceFinderWindow::OnGenerateRow)\n\t\t\t\t.OnMouseButtonDoubleClick(this, &SHardReferenceFinderWindow::OnDoubleClickTreeEntry)\n\t\t\t]\n\t\t]\n\t];\n\n\tInitiateSearch();\n}\n\nTSet<FName> SHardReferenceFinderWindow::GetCollapsedPackages() const\n{\n\tTSet<FHRFTreeViewItemPtr> ExpandedItems;\n\tTreeView->GetExpandedItems(ExpandedItems);\n\n\tTSet<FName> CollapsedPackages;\n\tfor(const FHRFTreeViewItemPtr Item : TreeViewData)\n\t{\n\t\tif(!ExpandedItems.Contains(Item))\n\t\t{\n\t\t\tCollapsedPackages.Add(Item->PackageId);\n\t\t}\n\t}\n\treturn CollapsedPackages;\n}\n\nvoid SHardReferenceFinderWindow::InitiateSearch()\n{\n\tif(TreeView.IsValid())\n\t{\n\t\tTSet<FName> UserCollapsedPackages = GetCollapsedPackages();\n\n\t\tTreeViewData = SearchData.GatherSearchData(BlueprintGraph);\n\t\tTreeView->RebuildList();\n\n\t\t// expand new items by default, unless they were intentionally collapsed.\n\t\tfor(const FHRFTreeViewItemPtr Item : TreeViewData)\n\t\t{\n\t\t\tconst bool bWasCollapsed = UserCollapsedPackages.Contains(Item->PackageId);\n\t\t\tconst bool bShouldExpandItem = !bWasCollapsed;\t\n\t\t\tTreeView->SetItemExpansion(Item, bShouldExpandItem);\n\t\t}\n\t}\n\t\n\tconst FText SummaryText = FText::Format(LOCTEXT(\"SummaryMessage\", \"This blueprint makes {0} references to other packages.\"), SearchData.GetNumPackagesReferenced());\n\tHeaderText->SetText(SummaryText);\n}\n\nFReply SHardReferenceFinderWindow::OnRefreshClicked()\n{\n\tInitiateSearch();\n\treturn FReply::Handled();\n}\n\nbool SHardReferenceFinderWindow::BringAttentionToSCSNode(const FName& SCSIdentifier) const\n{\n\tif(!SCSIdentifier.IsValid())\n\t{\n\t\treturn false;\n\t}\n\t\n\tif(!BlueprintGraph.IsValid())\n\t{\n\t\treturn false;\n\t}\n\t\n\tconst UBlueprint* Blueprint = BlueprintGraph.Pin()->GetBlueprintObj();\n\tif(Blueprint == nullptr)\n\t{\n\t\treturn false;\n\t}\n\n\tif(Blueprint->SimpleConstructionScript == nullptr)\n\t{\n\t\treturn false;\t\n\t}\n\n\tUBlueprintGeneratedClass* GeneratedClass = Cast<UBlueprintGeneratedClass>(Blueprint->GeneratedClass);\n\tif(GeneratedClass == nullptr)\n\t{\n\t\treturn false;\n\t}\n\t\n\t// Open Viewport Tab\n\tBlueprintGraph.Pin()->FocusWindow();\n\tBlueprintGraph.Pin()->GetTabManager()->TryInvokeTab(FBlueprintEditorTabs::SCSViewportID);\n\n\t// Find and Select the Component in the Viewport tab view\n\tconst TArray<USCS_Node*>& Nodes = Blueprint->SimpleConstructionScript->GetAllNodes();\n\tfor (USCS_Node* Node : Nodes)\n\t{\n\t\tif (Node->GetFName() == SCSIdentifier)\n\t\t{\n\t\t\tif (const UActorComponent* Component = Node->GetActualComponentTemplate(GeneratedClass))\n\t\t\t{\n#if ENGINE_MAJOR_VERSION < 5\n\t\t\t\tBlueprintGraph.Pin()->FindAndSelectSCSEditorTreeNode(Component, false);\n#else\n\t\t\t\tBlueprintGraph.Pin()->FindAndSelectSubobjectEditorTreeNode(Component, false);\n#endif\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n\nvoid SHardReferenceFinderWindow::OnDoubleClickTreeEntry(TSharedPtr<FHRFTreeViewItem> Item) const\n{\n\tif(Item.IsValid() && BlueprintGraph.IsValid())\n\t{\n\t\tif( UBlueprint* BlueprintObj = BlueprintGraph.Pin()->GetBlueprintObj() )\n\t\t{\n\t\t\tif( const UEdGraphNode* GraphNode = FBlueprintEditorUtils::GetNodeByGUID(BlueprintObj, Item->NodeGuid) )\n\t\t\t{\n\t\t\t\tFKismetEditorUtilities::BringKismetToFocusAttentionOnObject(GraphNode);\n\t\t\t}\n\t\t\telse if(Item->SCSIdentifier.IsValid())\n\t\t\t{\n\t\t\t\tBringAttentionToSCSNode(Item->SCSIdentifier);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid SHardReferenceFinderWindow::OnGetChildren(FHRFTreeViewItemPtr InItem, TArray<FHRFTreeViewItemPtr>& OutChildren) const\n{\n\tOutChildren += InItem->Children;\n}\n\nTSharedRef<ITableRow> SHardReferenceFinderWindow::OnGenerateRow(FHRFTreeViewItemPtr Item, const TSharedRef<STableViewBase>& TableViewBase) const\n{\n\tif(Item->bIsHeader)\n\t{\n\t\tconst FText SizeText = HardReferenceInternals::MakeBestSizeString(Item->SizeOnDisk);\n\t\tconst FText CategoryHeaderText = FText::Format(LOCTEXT(\"CategoryHeader\", \"{1} ({0})\"), SizeText, Item->Name);\n\n\t\treturn SNew(STableRow<TSharedPtr<FName>>, TableViewBase)\n\t\t\t.Style( GetStyle_HeaderRow() )\n\t\t\t.Padding(FMargin(2.f, 3.f, 2.f, 3.f))\n\t\t\t.ToolTipText(Item->Tooltip)\n\t\t\t[\n\t\t\t\tSNew(SHorizontalBox)\n\t\t\t\t+SHorizontalBox::Slot()\n\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t.Padding(FMargin(0.f, 0.f, 8.f, 0.f))\n\t\t\t\t.AutoWidth()\n\t\t\t\t[\n\t\t\t\t\tSNew(SImage)\n\t\t\t\t\t.Image(Item->SlateIcon.GetOptionalIcon())\n\t\t\t\t\t.ColorAndOpacity(Item->IconColor)\n\t\t\t\t]\n\t\t\t\t+SHorizontalBox::Slot()\n\t\t\t\t.AutoWidth()\n\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t.Padding(2.f)\n\t\t\t\t[\n\t\t\t\t\tSNew(STextBlock).Text(CategoryHeaderText)\n\t\t\t\t]\n\t\t\t];\n\t}\n\telse\n\t{\n\t\treturn SNew(STableRow<TSharedPtr<FName>>, TableViewBase)\n\t\t\t.ToolTipText(Item->Tooltip)\n\t\t\t[\n\t\t\t\tSNew(SHorizontalBox)\n\t\t\t\t+SHorizontalBox::Slot()\n\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t.Padding(FMargin(0.f, 0.f, 8.f, 0.f))\n\t\t\t\t.AutoWidth()\n\t\t\t\t[\n\t\t\t\t\tSNew(SImage)\n\t\t\t\t\t.Image(Item->SlateIcon.GetOptionalIcon())\n\t\t\t\t\t.ColorAndOpacity(Item->IconColor)\n\t\t\t\t]\n\t\t\t\t+SHorizontalBox::Slot()\n\t\t\t\t.AutoWidth()\n\t\t\t\t.VAlign(VAlign_Center)\n\t\t\t\t.Padding(2.f)\n\t\t\t\t[\n\t\t\t\t\tSNew(STextBlock).Text(Item->Name)\n\t\t\t\t]\n\t\t\t];\n\t}\n}\n\nconst FSlateBrush* SHardReferenceFinderWindow::GetBrush_MenuBackground() const\n{\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n\treturn FEditorStyle::GetBrush(\"Menu.Background\");\n#else\n\treturn FAppStyle::Get().GetBrush(\"Brushes.Recessed\");\n#endif\n}\n\nconst FSlateBrush* SHardReferenceFinderWindow::GetBrush_RefreshIcon() const\n{\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n\treturn FEditorStyle::GetBrush(\"Icons.Refresh\");\n#else\n\treturn FAppStyle::GetBrush(\"Icons.Refresh\");\n#endif\n}\n\nconst FTableRowStyle* SHardReferenceFinderWindow::GetStyle_HeaderRow() const\n{\n#if UE_VERSION_OLDER_THAN(5, 1, 0)\n\treturn &FCoreStyle::Get().GetWidgetStyle<FTableRowStyle>(\"TableView.Row\");\n#else\n\treturn &FAppStyle::Get().GetWidgetStyle<FTableRowStyle>(\"ShowParentsTableView.Row\");\n#endif\n}\n\n#undef LOCTEXT_NAMESPACE\n"
  },
  {
    "path": "Source/HardReferenceFinder/Public/HardReferenceFinder.h",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"Modules/ModuleManager.h\"\n\nclass FWorkflowAllowedTabSet;\nclass FBlueprintEditor;\n\nclass FHardReferenceFinderModule : public IModuleInterface\n{\npublic:\n\t/** IModuleInterface implementation */\n\tvirtual void StartupModule() override;\n\tvirtual void ShutdownModule() override;\n\t\nprivate:\n\tvoid RegisterBlueprintTabs(FWorkflowAllowedTabSet& TabManager, FName ModeName, TSharedPtr<FBlueprintEditor> InBlueprintEditor) const;\n};\n"
  },
  {
    "path": "Source/HardReferenceFinder/Public/HardReferenceFinderSearchData.h",
    "content": "﻿#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"AssetRegistry/AssetRegistryModule.h\"\n#include \"Templates/SharedPointer.h\"\n#include \"Textures/SlateIcon.h\"\n\nclass FBlueprintEditor;\nclass UEdGraph;\nclass UEdGraphNode;\nclass UK2Node_FunctionEntry;\nclass USCS_Node;\n\nclass FHRFTreeViewItem : public TSharedFromThis<FHRFTreeViewItem>\n{\npublic:\n\n\tbool bIsHeader = false;\n\tint SizeOnDisk = 0;\n\tFName PackageId = NAME_None;\n\tFText Name;\n\tFText Tooltip;\n\tFGuid NodeGuid;\n\tFName SCSIdentifier = NAME_None;\n\tFSlateIcon SlateIcon;\n\tFLinearColor IconColor = FLinearColor::White;\n\tTArray<TSharedPtr<FHRFTreeViewItem>> Children;\n};\ntypedef TSharedPtr<FHRFTreeViewItem> FHRFTreeViewItemPtr;\n\n#if ENGINE_MAJOR_VERSION < 5\ntypedef const TArray<UEdGraph*> FEdGraphArray;\n#else\ntypedef const TArray<TObjectPtr<UEdGraph>> FEdGraphArray;\n#endif\n\nclass FHardReferenceFinderSearchData\n{\npublic:\n\tTArray<FHRFTreeViewItemPtr> GatherSearchData(TWeakPtr<FBlueprintEditor> BlueprintEditor);\n\n\tint GetNumPackagesReferenced() const { return TreeView.Num(); }\n\nprivate:\t\n\tvoid Reset();\n\tUObject* GetObjectContext(TWeakPtr<FBlueprintEditor> BlueprintEditor) const;\n\tvoid GetBlueprintDependencies(TArray<FName>& OutPackageDependencies, FAssetRegistryModule& AssetRegistryModule, TWeakPtr<FBlueprintEditor> BlueprintEditor) const;\n\tvoid SearchGraphNodes(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const FEdGraphArray& EdGraphList) const;\n\tvoid SearchNodePins(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UEdGraphNode* Node) const;\n\tvoid SearchBlueprintClassProperties(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, UBlueprint* Blueprint) const;\n\tvoid SearchFunctionReferences(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UBlueprint* Blueprint) const;\n\tvoid SearchSimpleConstructionScript(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UBlueprint* Blueprint) const;\n\n\tUK2Node_FunctionEntry* FindGraphNodeForFunction(const UBlueprint* Blueprint, UFunction* FunctionToFind) const;\n\tvoid FindPackagesInSCSNode(TSet<UPackage*>& OutReferencedPackages,const USCS_Node* SCSNode) const;\n\tTArray<UPackage*> FindPackagesForProperty(FSlateIcon& OutResultIcon, const UObject* ContainerPtr, const FProperty* TargetProperty) const;\n\tFHRFTreeViewItemPtr CheckAddPackageResult(TMap<FName, FHRFTreeViewItemPtr>& OutPackageMap, const FAssetRegistryModule& AssetRegistryModule, const UPackage* Package) const;\n\t\n\tvoid GetAssetForPackages(const TArray<FName>& PackageNames, TMap<FName, FAssetData>& OutPackageToAssetData) const;\n\tbool TryGetAssetPackageData(FName PathName, FAssetPackageData& OutPackageData, const FAssetRegistryModule& AssetRegistryModule) const;\n\tFString GetAssetTypeName(const FAssetData& AssetData) const;\n\tFAssetData GetAssetDataForObject(const UObject* Object) const;\n\tint64 GatherAssetSizeByName(const FName& AssetName, FAssetRegistryModule& AssetRegistryModule) const;\n\tint64 GatherAssetSizeRecursive(const FName& OutFrontier, TSet<FName>& OutVisited, FAssetRegistryModule& AssetRegistryModule) const;\n\t\n\tTArray<FHRFTreeViewItemPtr> TreeView;\n};\n\n"
  },
  {
    "path": "Source/HardReferenceFinder/Public/HardReferenceFinderStyle.h",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"Styling/SlateStyle.h\"\n\n/**  */\nclass FHardReferenceFinderStyle\n{\npublic:\n\n\tstatic void Initialize();\n\n\tstatic void Shutdown();\n\n\t/** reloads textures used by slate renderer */\n\tstatic void ReloadTextures();\n\n\t/** @return The Slate style set for the Shooter game */\n\tstatic const ISlateStyle& Get();\n\n\tstatic FName GetStyleSetName();\n\nprivate:\n\n\tstatic TSharedRef< class FSlateStyleSet > Create();\n\nprivate:\n\n\tstatic TSharedPtr< class FSlateStyleSet > StyleInstance;\n};"
  },
  {
    "path": "Source/HardReferenceFinder/Public/HardReferenceFinderSummoner.h",
    "content": "// Copyright Epic Games, Inc. All Rights Reserved.\n\n#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"WorkflowOrientedApp/WorkflowTabFactory.h\"\n\nstruct FHardReferenceFinderSummoner : public FWorkflowTabFactory\n{\n\tFHardReferenceFinderSummoner(TSharedPtr<class FAssetEditorToolkit> InHostingApp);\n\n\tvirtual TSharedRef<SWidget> CreateTabBody(const FWorkflowTabSpawnInfo& Info) const override;\n\n\tvirtual FText GetTabToolTipText(const FWorkflowTabSpawnInfo& Info) const override;\n};\n"
  },
  {
    "path": "Source/HardReferenceFinder/Public/SHardReferenceFinderWindow.h",
    "content": "﻿#pragma once\n\n#include \"CoreMinimal.h\"\n#include \"HardReferenceFinderSearchData.h\"\n#include \"Widgets/SCompoundWidget.h\"\n#include \"Widgets/Views/STableViewBase.h\"\n#include \"Widgets/Views/STableRow.h\"\n#include \"Widgets/Views/STreeView.h\"\n\nclass FBlueprintEditor;\n\nclass SHardReferenceFinderWindow : public SCompoundWidget\n{\n\tSLATE_BEGIN_ARGS(SHardReferenceFinderWindow) {};\n\tSLATE_END_ARGS()\n\n\tvoid Construct(const FArguments& InArgs, TSharedPtr<FBlueprintEditor> InBlueprintGraph);\n\nprivate:\n\ttypedef STreeView<FHRFTreeViewItemPtr> SHRFTreeType;\n\t\n\tTSet<FName> GetCollapsedPackages() const;\n\tvoid InitiateSearch();\n\tFReply OnRefreshClicked();\n\tbool BringAttentionToSCSNode(const FName& SCSIdentifier) const;\n\tvoid OnDoubleClickTreeEntry(TSharedPtr<FHRFTreeViewItem> Item) const;\n\tvoid OnGetChildren(FHRFTreeViewItemPtr InItem, TArray< FHRFTreeViewItemPtr >& OutChildren) const;\n\tTSharedRef<ITableRow> OnGenerateRow(FHRFTreeViewItemPtr Item, const TSharedRef<STableViewBase>& TableViewBase) const;\n\n\tconst FSlateBrush* GetBrush_MenuBackground() const;\n\tconst FSlateBrush* GetBrush_RefreshIcon() const;\n\tconst FTableRowStyle* GetStyle_HeaderRow() const;\n\t\n\t/* The graph this window is operating on */\n\tTWeakPtr<FBlueprintEditor> BlueprintGraph;\n\t\n\t/* Stores the data from searching the graph for references*/\n\tFHardReferenceFinderSearchData SearchData;\n\n\t/* Stores the list of items dispalyed by the tree view widget */\n\tTArray<TSharedPtr<FHRFTreeViewItem>> TreeViewData;\n\n\t/* Holds a reference to the header widget */\n\tTSharedPtr<STextBlock> HeaderText;\n\n\t/* Holds a reference to the tree view*/\n\tTSharedPtr<SHRFTreeType> TreeView;\n};\n\n\n"
  }
]