C++ Interfaces Accessible In blueprints

From Unreal Wiki
Revision as of 04:13, 12 February 2025 by Unreal583 (talk | contribs)
Jump to navigation Jump to search

To create a c++ interface, add a new c++ class and under common classes select Unreal Interface



<syntaxhighlight lang="cpp">

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

/**

* 
*/

class ININO0_API IInoWeaponInterface { GENERATED_BODY()

// Add interface functions to this class. This is the class that will be inherited to implement this interface. public: virtual bool ShootWeapon(); };

</syntaxhighlight>