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.
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.
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How to delete some elements correctly when deleting an array loop?
What is the difference between Camera and CineCamera?
What controls of umg have mouse wheel events in UE4.27?
How to assign a value to a member of UMG's UMaterialInterface pointer type in C++?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-193927 in the post.
6 |
Component | UE - Gameplay |
---|---|
Affects Versions | 5.4 |
Created | Aug 25, 2023 |
---|---|
Updated | Feb 13, 2024 |
10933 - ChetRippo |