How do i reference a material instance in my .h file so that i dont have to do it in my blueprint so they are defaulted?
This is what i am currently using
UPROPERTY(EditDefaultsOnly, Category = "HitDecals")
class UMaterialInstance* PlasterDecal;
And this is how i want it to be so it is defaulted. I know that it wont work like this but how can i make it so that it is set to it automatically.
This is the name of the material (M_PlasterDecals_Inst)
UPROPERTY(EditDefaultsOnly, Category = "HitDecals")
class UMaterialInstance* M_PlasterDecals_Inst;
And then you create the material instance like this (in BeginPlay() for example, I don’t remember very well but I believe it won’t work in constructor):