Hello, I’ve searched the forums but haven’t found a solution that matches my problem.
I’m trying to access a file from within my plugin’s Content folder instead of the main project’s /Game/… folders. Accessing from within /Game works, but since I want my plugin to work independently of the project I migrated the assets to the plugin folder and tried accessing it with my code like so
#define VEHICLE_BP_IMPORT_PATH “/CreateConvertedCarBP/00_Common/BP_ConvertTest”
…
UBlueprint* ConvertedCarVehicleBP = Cast(UEditorAssetLibrary::DuplicateAsset(VEHICLE_BP_IMPORT_PATH, VEHICLE_BP_EXPORT_PATH));
…resulting in the error
LogEditorScripting: Error: DuplicateAsset. Failed to find the source asset. Can’t convert the path ‘/CreateConvertedCarBP/00_Common/BP_ConvertTest’ because it does not map to a root.
I don’t know what I’m doing wrong, I’ve tried
/Plugins/(PluginName)/…
/(PluginName)/Content/…
and so on, but the issue persists. Am I missing a setting somewhere for the project
to access files within its plugins? Placing the import path somewhere in /Game always works so I’m in a bind here, hopefully someone can point me in the right direction. Thanks!