//
//  Heise Vision Pro
//  Copyright © 2024 Gero Gerber. All rights reserved.
//

import RealityKit

extension Entity {
    func applyMaterial(_ material: RealityFoundation.Material) {
        (self as? ModelEntity)?.model?.materials = [material]

        for child in children {
            child.applyMaterial(material)
        }
    }
}
