# Reflected materials on reflected scene graph mesh components are incorrectly initialized

**URL:** <https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258>\
**Category:** Issues and Bug Reporting\
**Tags:** id, slug, open, name\
**Created:** [March 10, 2025, 11:40am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258 "2025-03-10T11:40:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Velocity\_Zero](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/velocity_zero/32/1036910_2.png) [@Velocity\_Zero](https://forums.unrealengine.com/u/Velocity_Zero)\
**Post date:** [March 10, 2025, 11:40am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/1 "2025-03-10T11:40:13Z")

</div>

### Summary

Reflected materials on reflected mesh components (scene graph) cannot be casted to the expted material subclass.

### Please select what you are reporting on:

Unreal Editor for Fortnite

### What Type of Bug are you experiencing?

Other

### Steps to Reproduce

- Create a custom material like `m_custom_material` (with at least one parameter) and a custom mesh like `sm_custom_mesh`.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/f/c4f68e9b8ca5c61163b3055db8ea903d85bd7967.jpeg)

- Configure the material slot of the mesh to be `m_custom_material`.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/1/0c1bba63b82ed8281da8d0aba478938295e71183.png)

- Compile verse in a SG project to reflect them.
- Create a custom component like the following:

```verse
using { /UnrealEngine.com/Temporary/SceneGraph }
using { /Verse.org/Simulation }

vz_test_reflected_material_component := class<final_super>(component) {
  OnBeginSimulation<override>(): void = {
    (super:)OnBeginSimulation()

    if (MeshComponent := Entity.GetComponent[mesh_component]) {
      if (ReflectedMeshComponent := sm_custom_mesh[MeshComponent]) {
        Print(ToDiagnostic(ReflectedMeshComponent.CustomMaterial))
        if (CustomMaterial := m_custom_material[ReflectedMeshComponent.CustomMaterial]) {
          Print("Material can be casted")
        } else {
          Print("Material can NOT be casted")
          Print("Overriding the material manually")
          set ReflectedMeshComponent.CustomMaterial = m_custom_material {}
        }
        Print(ToDiagnostic(ReflectedMeshComponent.CustomMaterial))
      } else {
        Print("Wrong mesh component")
      }
    }
  }
}

```

- Add an entity to the scene that uses the custom mesh and add the custom component to it.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/f/35fe502ab348b33e14929a2539f093d70417f60d.png)

- Run the simulation.

Here are the logs:

```auto
Assets_material /...-c1ab874f1c0b/vz_experiments_LevelInstance_3.vz_experiments:PersistentLevel.LevelEntity.LevelEntity.Entity.experiment_6-sm_custom_mesh_0.__verse_0x793F222D_CustomMaterial ❌UNEXPECTED
Material can NOT be casted ❌UNEXPECTED
Overriding the material manually
experiment_6-m_custom_material /...-c1ab874f1c0b/vz_experiments_LevelInstance_3.vz_experiments:PersistentLevel.LevelEntity.LevelEntity.experiment_6-m_custom_material_2147482645

```

### Expected Result

The cast should succeed.

### Observed Result

The cast should not fail.

### Platform(s)

UEFN (v34.00)

---

<div class="post-metadata">

**Author:** ![LionUnchained](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lionunchained/32/1039015_2.png) [@LionUnchained](https://forums.unrealengine.com/u/LionUnchained)\
**Post date:** [March 17, 2025, 10:55am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/3 "2025-03-17T10:55:11Z")

</div>

Can confirm:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/6/ca6ca543b608097decdfcfcb8da336b289ba3872.png)

_For context I force this error:_

```auto
SpriteMaterial:=Materials.MI_PlayerSprite[SpriteMesh.SpriteSlot] or Err("Player Sprite Material Retrieval Failed")

```

---

<div class="post-metadata">

**Author:** ![Jon.Cain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jon.cain/32/705238_2.png) [@Jon.Cain](https://forums.unrealengine.com/u/Jon.Cain)\
**Post date:** [April 22, 2025, 11:33am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/5 "2025-04-22T11:33:56Z")

</div>

Hi, just wanted to give a quick update on this issue. We have some legacy code that reflects the material for the assigned default material slot. As a result, the default material does not know which subtype it is referencing when pointing at the default material (although it does work for any subsequently assigned materials).

I have a fix, but it fundamentally requires a restructuring of a significantly large part of the way we map UEFN assets to verse. It’s a WIP and we will get it resolved asap, but just wanted to let you know it may be a few months before this is fixed due to the significant size of the codebase we have to reconsider (although this will also help with several other bugs, so it is something we need to do asap). Apologies for the inconvenience.

---

<div class="post-metadata">

**Author:** ![Velocity\_Zero](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/velocity_zero/32/1036910_2.png) [@Velocity\_Zero](https://forums.unrealengine.com/u/Velocity_Zero)\
**Post date:** [April 22, 2025, 11:42am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/6 "2025-04-22T11:42:23Z")

</div>

Thank you for the update, however this is a good and bad news at the same time. The beta release of Scene Graph seems to be around the corner and this issue is very frustrating. I have applied a workaround everywhere I need it, but for a released experience this will likely create hiccups of different sorts. For example in my case I will have to swap / programmatically re-initialize materials on hundreds of mesh components. I’m not sure if this could also affect PSO pre-caching in some sort (not an expert on that bit). However I suspect that I’ll run into some frame drops, temporary or repeating (I already one frame drop on mobile device that I can 100% reproduce when I update the material parameter of a re-initialized material).

---

<div class="post-metadata">

**Author:** ![Jon.Cain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jon.cain/32/705238_2.png) [@Jon.Cain](https://forums.unrealengine.com/u/Jon.Cain)\
**Post date:** [May 20, 2025, 3:29pm UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/7 "2025-05-20T15:29:23Z")

</div>

Hi, good news, we found an alternative method of addressing this issue for the SceneGraph Beta release, you should be able to now cast in that circumstance. The aformentioned plan to resolve the localised types in the asset digest is still the long term plan, but we’ve added this workaround in the meantime. Please let me know if you have an issues once with the features. Thanks!

---

<div class="post-metadata">

**Author:** ![Velocity\_Zero](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/velocity_zero/32/1036910_2.png) [@Velocity\_Zero](https://forums.unrealengine.com/u/Velocity_Zero)\
**Post date:** [May 20, 2025, 3:41pm UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/8 "2025-05-20T15:41:52Z")

</div>

A temporary workaround is good enough for me. Great news indeed, thank you for the headsup.

---

<div class="post-metadata">

**Author:** ![Jon.Cain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jon.cain/32/705238_2.png) [@Jon.Cain](https://forums.unrealengine.com/u/Jon.Cain)\
**Post date:** [May 29, 2025, 2:17pm UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/10 "2025-05-29T14:17:43Z")

</div>

Hey, Im very sorry to have to let you know this but our workaround has failed once it reached FN live and it’s been disabled. We are working on the full solution still and will get it in asap.

Apologies, realise this wasn’t the news you wanted to hear but the issue was critical enough for us to consider the workaround too much of a blocker, and we have no alternative but to ensure the digest is self referencing reflected assets as the solution. The status of the bug should cover updates.

Cheers,  
Jon

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 6, 2025, 11:40am UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/14 "2025-09-06T11:40:38Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![Bug-Reporter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bug-reporter/32/1223650_2.png) [@Bug-Reporter](https://forums.unrealengine.com/u/Bug-Reporter)\
**Post date:** [August 20, 2026, 6:00pm UTC](https://forums.unrealengine.com/t/reflected-materials-on-reflected-scene-graph-mesh-components-are-incorrectly-initialized/2383258/21 "2026-08-20T18:00:29Z")

</div>

FORT-870997 has been added to our ‘To Do’ list. Someone’s been assigned this task.
