Is this a bug? Empty material references some textures

Hello.
All are empty materials, but there are still references to unnecessary textures as shown on the right.
How to delete this unused reference?

You’re looking at the wrong material, it’s this one

Screenshot_1

thank you.

Look a little more carefully.
its material instans from this material.

No worries. I think the red lines mean asset was deleted but is still referenced. Need to watch that, you could end up screwing up your project… :wink:

I’m not good at English excuse me. What does it mean to not worry?
This material is completely empty and you shouldn’t need to refer to anything
When you apply this material and run the game, it will actually load the texture.

The material I pointed at is not empty.

What do you mean?
I think the instance created from the empty material is empty, of course.
…I feel like I’m being teased.
I would like to know why a material instance created from an empty material references a texture.

sometimes unreal keeps references like that. I suspect it’s it’s part of the system made to reconcile instance values when parameters are renamed.
I’ve successfully fixed a case like this in the past. try resaving the material now that it’s empty and the references should be gone. if not try restarting the editor as well to really ensure references are gone.

Thank you for your reply.
I thought same things. it was a It may be the behavior of a system that temporarily holds parameters?
so I saved the modified material data and restarted the editor, but the references still remain.

If you copy the same material to another location and create an instance from it, the reference will be removed, so
Obviously the original material refers to some invisible data.
I’m wondering if there is a way to get rid of this apparently unnecessary reference and clean it up, but is there such a way?

(I think there is a smart way, not a brute force method like the above new copy and forced deletion of the original material …)

1 Like

It’s not a bug. Material Instances in Unreal keep references to textures even if removed parameters with those textures. It’s intended behavior - you don’t want Unreal to “forget” your parameter values (textures, scalars, vectors, bools) when you temporary delete some parameters from the material for debug/test. But yes, the downside - it keeps references, therefore loads more textures than needed.
The solution is simple:

  1. Open Material Instance
  2. Remove parent material (that will clean Material Instance)
  3. Save Material Instance
  4. Press Ctrl+Z to restore previous parameters
  5. Save Material Instance Again