Increase max entity count

The maximum amount of syncable objects that can be active is currently ~100. After the max is reached, additional objects are destroyed automatically as they’re created.

These lines are executed in CoherenceMonoBridge (642-644) when this happens:

if (destroyReason == DestroyReason.MaxReached)
                Logger.Warning($"Max entity count exceeded. {} [{entityID}] will be destroyed.", ("context", this));

It is difficult to create anything of scale with this constraint.


And added. Thanks @Neodamus .

Hey @Neodamus , the max has been increased to 1000. To paraphrase our devs:

The limit is a flat 1000 (no longer based on the room capacity).
Users can also increase that on demand in a self-hosted or local development scenario. When it comes to creating rooms on a cloud RS you have to request a limit change on a per project basis, in Rooms > Advanced Config.

1 Like

Awesome news, thank you for that!

In regards to changing the max entity count locally, how do I do that?

Your reply shows how its set up on cloud, which I could find very easily, but this has no relation to local development.

I’m guessing this might be added to Coherence settings in Unity eventually where the other local replication server settings currently are, but there is no clear way to change this setting in version I’m currently using, 0.10.14.

I have a suspicion it may be related to 1.0 which is coming very soon, but I’ve asked for some clarification.

Hey @Neodamus does this info help?

When creating a room via ReplicationServerRoomsService.CreateRoom you can pass SelfHostedRoomCreationOptions as creation options.
In order to change the entity limit just set the SelfHostedRoomCreationOptions.MaxEntities to a desired value.
(There is no UI option to do this.)

I sense a new suggestion coming :slight_smile:

1 Like

I understand the response, but it might require a decent amount of work to help my situation :smile:

I currently use the built-in UI to create rooms, so I’d have to create a solution that works around the default room creation, not sure how much time that would actually take me.

I will make a suggestion that for 1.0, a setting is added here to set max entity count:

Since this settings area already exists in the Coherence package and just means adding access to an already existing creation option, I’m guessing this is a fairly minimal change.

Also, this would just mirror the addition of the max entity count to the cloud settings.

1 Like