Play Crash I Dont Understand

odd error where i can compile fine but replicating my chests Inventory causes an assertion error.

.cpp replication:



void APickup_ChestMaster::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
{
	DOREPLIFETIME(APickup_ChestMaster, Gold);
	//DOREPLIFETIME(APickup_ChestMaster, Inventory);
}


.h declaration in public:



	TArray<TSubclassOf<ABaseInventoryItem>> Inventory;


do i need to create an entry or something for the replication to work? if i uncomment it, it crashes on play but compiles fine.

When the game crashes, does it give you a position in code where the crash occurs?

Could be that it tries to replicate something that isn’t there or that it replicates forever? It could be a lot of things.

Screenshot

So it says it can’t find a certain property called “Inventory” in your Pickup_ChestMaster.

Perhaps you should look that class over and see if anything sticks out?

Do you have UPROPERTY(Replicated) before TArray<TSubclassOf<ABaseInventoryItem>> Inventory; ?

Thanks Raikoh, a completely dumb thing on my part, i have other replicated variables i did just fine, forgot that part on this one for some reason, thanks a ton.