Obtaining Material Reference and Changing its Parameters

I’ve created a material in the blueprints and I am trying to pass some parameters to it (RenderTarget textures to be more precise). Every time I try using

static
ConstructorHelpers::FObjectFinder
Material(TEXT(“Material’/Game/Materials/YourMaterialName.YourMaterialName’”));

th game crashes. Am I doing something wrong? Maybe I forgot something along the way? Also, as a workaround, could I apply the material on a mesh, put the mesh in the scene, and just get the material from it? Don’t know how correct this “hack” is. Any advice would be welcomed!