Summary
Entity.FindCreativeObjectsWithTag fails to retrieve creative_objects
even when it should and when creative_device
can. This is an issue because there is still a lot of functionality that devices cover that SceneGraph does not offer a replacement for. API where they interact or rely on each other is vital.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- First write a Verse tag definition and build code:
my_creative_object_tag := class(tag){}
-
After building code, apply the tag to a
creative_object
of your liking (which in a real world scenario you would usecreative_object
which has Verse API). -
Then write a Verse authored
creative_device
whichOnBegin
retrieves allcreative_object
’s with said tag:
my_creative_device := class(creative_device):
OnBegin<override>()<suspends>:void =
for(Obj:FindCreativeObjectsWithTag(my_creative_object_tag{})):
Print("Found Creative Object!")
-
Push changes and start the game and for the
n
objects you applied the tag to, the print statement will executen
times as expected. -
Reproduce this same workflow/logic but using the SceneGraph toolset.
-
Write a Verse component which awaits a round start with
fort_round_manager
in order to safe guard failure due to the devices in the level not being initialized simulation start.
my_verse_component := class<final_super><castable>(component):
OnBeginSimulation<override>():void =
if(FortRoundManager := Entity.GetFortRoundManager[]):
FortRoundManager.SubscribeRoundStarted(OnRoundStarted)
OnRoundStarted():void =
for(Obj:Entity.FindCreativeObjectsWithTag(my_creative_object_tag{})):
Print("Found Creative Object!")
-
Create an entity prefab definition
-
You can add the
my_verse_component
to the defintion OR you can drag and drop the entity prefab definition into the level to create an entity prefab instance and add themy_verse_component
to it. As long as the entity contains the component as seen in the image below.
-
Finally, push changes, start the game, and you will observe that the SceneGraph-equivalent workflow will not properly print
n
times for then
objects the tag was applied to.
Expected Result
For the n
objects you applied the tag to, the print statement will execute n
times as expected.
Observed Result
SceneGraph-equivalent workflow will not properly print n
times for the n
objects the tag was applied to.
Platform(s)
windows