Summary
This is a very strange issue and I recently noticed it in main project after playtesing with the v35.00 patch. In short, when there’s a parameterized material on a mesh component and that entity is nested on entities that don’t have a transform_component
, setting the material parameter will not propagate to the referenced material as there will be no visual change in-game.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Stability
Steps to Reproduce
Use vz_anomaly_5
project (see code below).
Follow the video:
- the project has many nested entities as it also used to showcase another issue: [MAJOR] Scene Graph - Editor closes without any crash logs when setting an editable entity
- we can delete unneeded entities to narrow the issue
- when the
root
entity (parent oftarget_box_entity_2
has notransform_component
material parameter updates will break and not propagate properly
Code used:
using { /Verse.org/SceneGraph }
using { /Verse.org/Simulation }
using { /Fortnite.com/Devices }
vz_test_material_parameter_component := class<final_super>(component) {
@editable
ETrigger: trigger_device
@editable
ETarget: entity
OnSimulate<override>()<suspends>: void = {
Agent := ETrigger.TriggeredEvent.Await()
GAgent := if (UAgent := Agent?) {
UAgent
} else {
Print("no agent found")
return
}
var Value: float = 1.0
if (Box := ETarget.GetComponent[sm_box]) {
Print(ToDiagnostic(Box))
Material := m_parameterized {
Value := Value
}
set Box.Material = Material
} else {
Print("setup failed")
return
}
Print("waiting for update")
loop {
ETrigger.TriggeredEvent.Await()
if:
Box := ETarget.GetComponent[sm_box]
Material := m_parameterized[Box.Material]
then {
Print(ToDiagnostic(Box))
Print(ToDiagnostic(Material))
set Value = Value + 1.0
set Material.Value = Value
Print("material should show {Value} now")
}
}
}
}
Expected Result
Material updates should propagate properly regardless of what and how the parent entities are structured.
Observed Result
Material parameter updates via code are no longer propagating when parent entities have no transform_component
(not tested if it’s just “any component”, only tested with adding removing transform_component
as I usually delete it for logic only entities).
Platform(s)
PC / UEFN
Island Code
2416-0286-0747