Announcement

Collapse
No announcement yet.

How to override all materials in scene on BeginPlay?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Never mind, got it working by getting AllComponentsOfClass instead

    Leave a comment:


  • How to override all materials in scene on BeginPlay?

    So I want to do this little test, where I override all materials on all scene objects on BeginPlay, to test performance between using a really simple material vs expensive materials.

    For Static Meshes, it's easy, but I'm having a hard time replacing materials on our custom Blueprint classes. I get all Child Actors in Blueprint, then cast to a StaticMeshActor, and get the StaticMesh, then replace all Materials on said StaticMesh with the cheap one, but it doesn't work.

    Is there an easier way of doing this?

    Thanks!
Working...
X