# Interface method add an object following the same interface

**URL:** <https://forums.unrealengine.com/t/interface-method-add-an-object-following-the-same-interface/682480>\
**Category:** C++\
**Tags:** unreal-engine, UInterface\
**Created:** [November 2, 2022, 1:26pm UTC](https://forums.unrealengine.com/t/interface-method-add-an-object-following-the-same-interface/682480 "2022-11-02T13:26:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rexy729](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rexy729](https://forums.unrealengine.com/u/rexy729)\
**Post date:** [November 2, 2022, 1:26pm UTC](https://forums.unrealengine.com/t/interface-method-add-an-object-following-the-same-interface/682480/1 "2022-11-02T13:26:31Z")

</div>

```auto
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "../Shared/Definition/WvLevelObjectType.h"
#include "../Shared/Definition/WvMonsterType.h"
#include "WvGamePlayAttackerInterface.generated.h"

// This class does not need to be modified.
UINTERFACE(MinimalAPI)
class UWvGamePlayAttackerInterface : public UInterface
{
	GENERATED_BODY()
};

/**
 * 
 */
class WAVE_API IWvGamePlayAttackerInterface
{
	GENERATED_BODY()

	// Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
	UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
	void AddDamageable(const IWvGamePlayAttackerInterface* damageableObject);
};

```

I get some compilation error. As title, I would like to add an object following same interface.  
Any one has feedback.
