Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/Kismet2 > API/Editor/UnrealEd/Kismet2/FComponentEditorUtils
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Public/Kismet2/ComponentEditorUtils.h |
| Include | #include "Kismet2/ComponentEditorUtils.h" |
| Source | /Engine/Source/Editor/UnrealEd/Private/Kismet2/ComponentEditorUtils.cpp |
static bool AttemptApplyMaterialToComponent
&40;
USceneComponent &42; SceneComponent,
UMaterialInterface &42; MaterialToApply,
int32 OptionalMaterialSlot
&41;
Remarks
Attempts to apply a material to a component at the specified slot. True if the material was successfully applied to the component.
Parameters
| Name | Description |
|---|---|
| SceneComponent | The component to which we should attempt to apply the material |
| MaterialToApply | The material to apply to the component |
| OptionalMaterialSlot | The material slot on the component to which the material should be applied. -1 to apply to all slots on the component. |