Error loading assets in code

Hello,

I’m running into an error trying to load an asset from a file path. I’m fairly new to c++ so I apologize if I’m missing something obvious in advance.

What I’m trying to do is load a tileset to use with my TileMap:

Header File:

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Dungeon")
		UPaperTileSet* TownTileSet;

Constructor (loading this way gives the error, if I just set the tileset in blueprints it doesn’t give an error message):

static ConstructorHelpers::FObjectFinder<UPaperTileSet>TempTileSet(TEXT("/Game/PlaceHolderAssets/TileSets/TownTiles_TileSet"));
	TownTileSet = TempTileSet.Object;

The issue that I run into is that when I try to create a blueprint of my actor and save it I get the following error message:

Can't save C:/Users/snackmix/Documents/Unreal Projects/TestCPP/Content/Test/TestMap2.uasset: Graph is linked to private object(s) in an external package.
External Object(s):
AssetImportData
  
Try to find the chain of references to that object (may take some time)?

Is this the incorrect way to load an object from a file path? Thank you for taking the time to read. Please let me know if you need anything else.