How to set Material from .mtl to Procedural Mesh?

I’m creating procedural mesh from obj file and extracted Texture2D from .mtl file using assimp library. But I’m able to set material to procedural mesh. When I tried to create dynamic mesh instance it gives null object. Please guide me.