- Create a new interface called Wearable ( Creating both IWearable & UWearable):
- Add the following functions to the header of the IWearable class:
class CHAPTER_08_API IWearable{ GENERATED_BODY() // Add interface functions to this class. This is the // class that will be inherited to implement // this interface.public: UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Wearable) int32 GetStrengthRequirement(); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Wearable) bool CanEquip(APawn* Wearer); UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Wearable) void OnEquip(APawn* Wearer); ...