Description

https://udn.unrealengine.com/questions/570767/filtering-bug-with-iseditoronlyactor.html

On a a blueprint that inherits from an actor class such as FunctionalActor, the user can mark Actor::bIsEditorOnlyActor = true ("Cooking/Is Editor Only Actor").

That variable gets set on the Class Default Object for the BlueprintGeneratedClass.
This causes a warning in cooking per the licensee's discovery:

SavePackage.cpp ConditionallyExcludeObjectForTarget
The BlueprintGeneratedClass is not marked editor-only because classes are not editor-only.
The Actor-Subclass CDO is not marked editor-only because it is a CDO. There is a comment about "CDOs should be included whenever their class is included, but classes are always included, so this means CDOs are always included.
All components that have the Actor-Subclass CDO as their outer are therefore also not editor-only.

Savepackage.cpp IncludeObjectAsDependency
The Actor-Subclass is marked as editoronly because it has the variable set, and IncludeObjectAsDependency as not making an exception for CDOs as ConditionallyExcludeObjectForTarget does.

This causes a warning during cooking of the package:

[2020.04.20-16.47.13:994][ 0]LogSavePackage: Warning: A dependency 'MrpTest_C /Game/Effects/ParticleSystems/MrpTest.Default_MrpTest_C' of 'BillboardComponent /Game/Effects/ParticleSystems/MrpTest.Default_MrpTest_C:Sprite' was filtered, but is mandatory. This indicates a problem with editor only stripping. We will keep the dependency anyway (4).

Steps to Reproduce

Create a Blueprint Class based on the FunctionalTest class.
Set "Cooking/Is Editor Only Actor" to true in the Blueprint's property editor.
Cook for a non-editor target such as WindowsNoEditor.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to AnswerHub just mention UE-92226 in the post.

2
Login to Vote

Unresolved
ComponentUE - Gameplay - Blueprint
Affects Versions4.21
Target Fix5.1
CreatedApr 20, 2020
ResolvedAug 31, 2021
UpdatedNov 22, 2021