Hierarchical instanced static mesh not showing the material

Hey guys,
so basically I’m not new to programming games and I’ve been working with blueprints for some months and I want to go further.
I made just a simple maze generator with 2 hierachical instanced static mesh components (for the walls and the floor).
Yeah so, first I made it in blueprints and it worked fine. A week ago I decided to write it in C++.
And the code works great, but the Hierarchical instanced static meshs are just white.
I’ve set the Material in the Settings window, but still it’s just white. I also tried to set the material through code - and it still won’t work.
So, I would like to ask: How do I fix that?
I can add my code, but I know that my code isn’t that great.