Summary
My game assigns materials to custom_props at runtime. I refer to these materials primarily via an editable material array where I return the material from a method via index. There is also a section of code that refers to a base material directly based on its location and name in my CustomMaterial folder. Both of these methods have been working perfectly.
Recently I created several new materials and none of these materials work in code, although they work perfectly when assigned to custom_props or other objects in the UEFN editor (they are visible both in the editor and when testing in Fortnite). When accessing them in code via the editable array the retrievable seems to work (the if statement succeeds), but the material is blank when applied to the object. When trying to access them directly via their location, the code gives an error saying they do not exist.
In both instances, materials created before a certain date work perfectly, while materials created recently either are not retrieved from the array or create an error in the code (when referring to location directly in code). Copying old materials and changing their names works fine, but editing the material causes the issue to appear (even if the name is unchanged and the code is not edited). Material instances newly created from older parent materials work with no issue. Materials created automatically by the editor when dragging by a texture onto an object have the same issue and cannot be referenced in Verse.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- Create new material
- Refer to material in Verse Code (example: var PowerMaterial : CustomMaterials.mi_PowerGem_Blue_material = CustomMaterials.mi_PowerGem_Blue_material{})
- Code will return an error that material does not exist although it does
Expected Result
Expect code to be able to reference materials regardless of when they were created. Expect materials referenced and assigned using SetMaterial() to act the same as materials assigned in the UEFN editor.
Observed Result
Materials created later are not found when referenced via Verse code although they are in the location referenced.
Platform(s)
Unreal Engine for Fortnite
Island Code
7021-7820-8082