/Engine/Source/Editor/UnrealEd/Public/Kismet2/ComponentEditorUtils.h
Attempts to apply a material to a component at the specified slot.
True if the material was successfully applied to the component.
static bool AttemptApplyMaterialToComponent ( [USceneComponent](API\Runtime\Engine\Components\USceneComponent) * SceneComponent, [UMaterialInterface](API\Runtime\Engine\Materials\UMaterialInterface) * MaterialToApply, int32 OptionalMaterialSlot )