Tmap.Remove problem: "'TObjectPtr<AActor>' does not name a value"

I’m trying to remove a key/value pair from a map.
The following code gives me an error about the InKey.

	UPROPERTY(BlueprintReadWrite, Category ="System State Store")
	TMap<TObjectPtr<AActor>,FRegistry> SSS_EntityRegistry;

	UFUNCTION(BlueprintCallable)
	void DeregisterEntityFromAllStateComponents()
	{
		
		SSS_EntityRegistry.Remove(TObjectPtr<AActor>);
		
	}

Error:

I’ve tried to find an example but I can only find examples using Fstring or Int. It seems that involving an actor point is causing some sort of problem here.

Any help is appreciated, thanks

I don’t think this is the most correct answer, however it does work:

	UFUNCTION(BlueprintCallable)
	void DeregisterEntityFromAllStateComponents(AActor* Entity)
	{
		int32 RemovedFromSSS_EntityRegistry = SSS_EntityRegistry.Remove(Entity);
		if (RemovedFromSSS_EntityRegistry > 0)
1 Like