Verse API SetCarryableMaterial doesn't work

Summary

Calling carryable_spawner_device.SetCarryableMaterial doesn’t work starting v41.00

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Place a Carryable Item Spawner device
  2. Create a simple static mesh with one material slot
  3. Create 2 different materials, set one as default on the mesh
  4. Set created static mesh as Custom Mesh on the device
  5. In Verse, call SetCarryableMaterial with other material

Expected Result

The material on the carryable is changed

Observed Result

The material of the carryable doesn’t change

Platform(s)

Windows

Update:

This appears to happen when using materials that have parameters and instantiating them from verse and having the carryable as the only referencing object:

(rawdogging code below so might be syntactically wrong but you get the point)

This fails:
MFail := M_Mat{Param1:=1.0}
Carryable.SetCarryableMaterial(MFail)

This seems to work as workaround:
DummyEntity := entity{}
DummyMesh := some_mesh:
Entity := DummyEntity
Material1 := M_Mat{Param1:=1.0}
// add this entity to scene somewhere
Carryable.SetCarryableMaterial(DummyMesh.Material1)

Someone else can maybe test and confirm that this works before we declare this a workaround

This is 100% broke as of v41.00.

I can also confirm that the workaround from @VerySpicyGames works.

1 Like

I can also confirm this, I have the exact same issue with setting material instances with unique parameter values on carryables. The workaround seems to work but would be nice to have this fixed properly in an update.

1 Like

FORT-1113712 is ‘Closed’ as ‘Fixed’. The issue will be addressed in 41.20.