How to include the header file from a plugin

Note: Your plugin is going to be a module which gets included in other projects. By default, if you include your module plugin in your project, only the editor can access your classes and library functions. If you want to give your code access to your plugin classes, remember to add “_API” to your class definition. Example:

UCLASS()
class VRTECH_API UGameLib : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

public:
...
};

This grants any project using my “vrtech” module as a dependency with code access to its function library. I spent a good two hours trying to figure this out.
Note: enums don’t need the API markup.

1 Like