Description

The cooker settings include the ClassesExcludedOnDedicatedServer/ClassesExcludedOnDedicatedClient lists, which specify classes that should be excluded when cooking a dedicated server/client. These lists are checked in UObject::NeedsLoadForServer/NeedsLoadForClient, and UWorld::SpawnActor will use these functions (via UObject::CanCreateInCurrentContext) to check if the actor can be spawned.
However, there doesn't seem to be any such check for components/subobjects (with the exception of components on blueprint actors), causing these classes to be spawned on the dedicated server/client.

Steps to Reproduce

Create an actor component, and either add its class to the "ClassesExcludedOnDedicatedServer" list or override UObject::NeedsLoadForServer to return false.
Create this component as a default subobject of an actor that exists on the server and client.
Package the project as a dedicated server.
Expected: the actor will still exist on the server, but it will not have its excluded component.
Actual: The excluded component will still be spawned on the server.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-193927 in the post.

5
Login to Vote

Backlogged
ComponentUE - Gameplay
Affects Versions5.4
CreatedAug 25, 2023
UpdatedFeb 13, 2024
Pull Requests
10933
View Jira Issue