google/filament

Material / MaterialInstance getName is unset in release mode

Opened this issue · 0 comments

⚠️ Issues not using this template will be systematically closed.

Describe the bug

Using material.getName() or materialInstance.getName() always gives an empty value on filament release build, while on debug it returns the name.
I assume it's this line probably being completely optimised away in release mode:

UTILS_UNUSED_IN_RELEASE bool const nameOk = parser->getName(&mName);

To Reproduce
Steps to reproduce the behavior:

  1. Call getName() in debug and release and compare the output

Expected behavior

It should also return the name in release mode. We need the material name to select the right one from a complex model where guessing the index isn't really feasible.

Screenshots
n/a

Logs
n/a

Desktop (please complete the following information):

  • OS: Android
  • GPU: Mali-G78 MP14
  • Backend: OpenGL

Smartphone (please complete the following information):

  • Device: sm-g991b/ds aka. Samsung Galaxy S21 5G
  • OS: Android 14

Additional context
n/a