Error on Networked Component Spawn

Recieving the following error when a new client connects to the authoritative instance. This appeared after adding a replica chunk to my Player Component.

***No Factory Found for component of type 'actor'***

It seems my issue was in manually creating a Replica in my player component. By removing the lines where it is created, the client connects with no errors. I guess the replica is being created automatically for me somehow, and by manually adding it again, it caused issues? Not sure, just speculating…

Before:

m_replica = GridMate::Replica::CreateReplica("PlayerReplica");
GridMate::ReplicaChunkDescriptorTable::Get().RegisterChunkType<PlayerChunk>();
PlayerChunk* replicaChunk = GridMate::CreateReplicaChunk<PlayerChunk>();
replicaChunk->SetHandler(this);
m_replica->AttachReplicaChunk(replicaChunk);
m_replicaChunk = replicaChunk;
return m_replicaChunk

After:

GridMate::ReplicaChunkDescriptorTable::Get().RegisterChunkType<PlayerChunk>();
PlayerChunk* replicaChunk = GridMate::CreateReplicaChunk<PlayerChunk>();
replicaChunk->SetHandler(this);
m_replicaChunk = replicaChunk;
return m_replicaChunk

Hi @Leonard, I’m glad you were able to sort out the issue. I am also curious as to exactly why manually creating a Replica caused an issue. I’ll see if one of our networking friends has any input on the matter and get back to you :slight_smile:

Thanks for passing it on! Really appreciate you guys being active on these forums and on Slack.