Connection Permissions

The host can change some permissions for a specific Connection.

Defaults for all connections are set in Project Settings > Networking. To override them for a single connection, do it in the OnActive network event.

Only the host can set these, and the host always has them regardless of what you set.

Permission Controls
CanSpawnObjects Whether this connection can create its own networked objects
CanRefreshObjects Whether this connection can send refresh updates for objects it owns
CanDestroyObjects Whether this connection can destroy networked objects it owns

Spawning Objects

You can set Connection.CanSpawnObjects to allow or disallow a specific connection to create their own networked objects. It defaults to the project setting.

Refreshing Objects

Connection.CanRefreshObjects controls whether the owner of a networked object can send refresh updates for it. Turn it off if the host should be the only one sending these updates.

Destroying Objects

Connection.CanDestroyObjects controls whether a connection is allowed to destroy the networked objects it owns. Turn it off if the host should be the only one deciding when something is removed.

public void OnActive( Connection channel )
{
	// Let clients own and move things, but not create or delete them
	channel.CanSpawnObjects = false;
	channel.CanDestroyObjects = false;
}

Kicking

Permissions decide what a connection may do once it's in. To remove one entirely, the host can kick it:

channel.Kick( "No cheating" );

To turn a connection away before it ever joins, use AcceptConnection instead - see Network Events.






Created 21 Mar 2024
Updated 20 Aug 2026