How to add a custom mesh from a Entity loaded from 3D model, and apply Video Material to it

I have a Entity which is loading a USDZ asset.

let modelName = "example.usdz" 
guard let modelURL = Bundle.main.url(forResource: modelName, withExtension: nil) else {
                fatalError("Failed to find model file: \(modelName)")
            }
let videoEntity = try! Entity.load(contentsOf: modelURL)

Now i am creating a video Material using AVPlayer, VideoMaterial

 let asset = AVURLAsset(url: url)
 let playerItem = AVPlayerItem(asset: asset)
 let player = AVPlayer()
 let material = VideoMaterial(avPlayer: player)

And adding Video material to a sphere

videoEntity.components.set(ModelComponent(mesh: .generateSphere(radius: 1E3), materials: [material]))

But I want a mesh of my 3d model as shape. Any Possible Ways to Achieve This.

Replies

Sorry, the question has been written Incorrectly. You can ignore this Post

hi @varxcx Did you ever figure out how to get a video material to play on a USDZ asset? I can get it to work with a sphere or a plane that's built in SWIFT, but I cannot get it to work with USDZ.