[MAJOR] Scene Graph - Parameterized materials no longer updating via code when parent entities do not have a `transform_component`

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:

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

Hi,

Thank you for reporting this problem. We’ve investigated and found the root cause of the issue, it’s related to a subtle dependency for replication in the transform_component+entity heirarchy, so the Verse commands are executing they’re just not reaching the client/draw data doesnt change (this would happen with any component realistically).

We unfortunately don’t have a quick fix, but we are ironing out a permanent fix for the next Fortnite update. However as a workaround in the meantime, please add a replication_component to your empty base entity, that should resolve the issue until we have a more robust solution.

Thanks,
Jon

1 Like
replication_component<native><epic_internal> := class<final_super>(component)
                             ^~~~~~~~~~~~~~~

Cough cough :laughing:

The workaround for now is to anchor those components to level root.

I have another issue with some prefabs, which is potentially related, but I had no time to isolate it yet. Mesh components would not appear when parented onto a pre-placed prefab at runtime, the workaround was to move them to the sim entity until it’s fixed.

2 Likes

(Ooof haha)

1 Like

FORT-902650’s status has changed to ‘Ready for QA’. A member of the QA department is investigating the issue.