Call the function UBpExportForAiHelp::Process() just once on BeginPlay
For example, in the game mode BeginPlay:
3. If preferred, call the static Process function in C++ or wherever you’d like. You will likely want it called conditionally, such as only for PIE / editor scenarios.
Filtering removes modules or specific files from being exported. This should be done for various reasons:
To reduce the export file size, so the AI can understand your entire project. If you do not have a paid subscription or your project is simply too large, then the AI will only see part of what you upload to it. See the section below for hints on ensuring the LLM can understand your whole project.
To avoid Copyright infringement, because some terms of service / legal agreements do not allow for source code to be uploaded to AI websites.
There are three filtering options on the static “Process” function call that can be left empty if unused:
AssetsExcluded: These are folder paths which should be avoided / excluded from the output, examples include:
“/Game/LevelPrototyping”
“/Game/FirstPersonArms”
Etc
ExcludedFilenames: These are specific files which should be avoided / excluded from the output, examples include:
“SomeSecretCode.cpp”
“StuffWithLicenseAgreementToNotUpload.cpp”
Etc
AssetsFromAdditionalPackages: These are plugins or packages beyond “/Game” assets that SHOULD be included, for example:
"/Voxel"
Etc
The exported Blueprint output is hard for people to read and almost impossible to use, but it’s useful to LLMs. Simply upload either the BP or BP and CPP text file to your conversation, and begin asking for personalized help on your project.
Some hints:
For most projects, filtering will be required to keep the final output size small enough. Look at the output file called “UE_Project_As_Text_Statistics” to figure out large resources or irrelevant items. Focus on the largest files first.
After you upload your project to an AI / LLM, look in your file and see which asset comes first. Ask the AI a detail about that asset to test it and ensure it is seeing / understanding all the way to the beginning of the file.