# Adding new class that derives from plugin class

**URL:** <https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333>\
**Category:** Plugins\
**Tags:** unreal-engine, Plugins, UE4, CPP, question\
**Created:** [December 23, 2014, 12:02pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333 "2014-12-23T12:02:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![plockhart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plockhart](https://forums.unrealengine.com/u/plockhart)\
**Post date:** [December 23, 2014, 12:02pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333/1 "2014-12-23T12:02:03Z")

</div>

Hey,

I am using a plugin in a Unreal C++ project. I am trying to create a new class that derives from a class in the plugin. When I use the unreal wizard to do so, the generated source file has compiler errors complaining about how the super class cannot be found.

How can I include the library and dll files from the plugin in my project? I’m new to unreal and unsure if there are extra steps involved. I have included the plugins dll and lib files in the VS project’s Include Directories and Library Directories.

---

<div class="post-metadata">

**Author:** ![plockhart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plockhart](https://forums.unrealengine.com/u/plockhart)\
**Post date:** [March 10, 2015, 4:55pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333/2 "2015-03-10T16:55:48Z")

</div>

Bring the code into your project. The whole point of a plugin is that you can compile your code with or without it. What I was asking would have made it not a plugin in the true sense.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a4cc7aca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a4cc7aca](https://forums.unrealengine.com/u/anonymous_user_a4cc7aca)\
**Post date:** [May 7, 2015, 6:23pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333/3 "2015-05-07T18:23:09Z")

</div>

Where you able to create a plugin class as a base class and another plugin class that inherits it? Can u show a code snippet? I’m struggling with this.

---

<div class="post-metadata">

**Author:** ![plockhart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plockhart](https://forums.unrealengine.com/u/plockhart)\
**Post date:** [May 7, 2015, 10:01pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333/4 "2015-05-07T22:01:31Z")

</div>

In the end, what I did was I created a new class that could act completely independently from any plugin. Then, I created a blueprint that called methods on this independent class depending on what the plugin’s own blueprints etc were doing, thus acting like a mediator between the plugin and my new class.

I understand this might not be what suits your project, but thankfully I was able to get away with it.

---

<div class="post-metadata">

**Author:** ![Rogue\_Programmer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rogue_programmer/32/731748_2.png) [@Rogue\_Programmer](https://forums.unrealengine.com/u/Rogue_Programmer)\
**Post date:** [July 8, 2017, 9:20pm UTC](https://forums.unrealengine.com/t/adding-new-class-that-derives-from-plugin-class/302333/5 "2017-07-08T21:20:18Z")

</div>

I had the same problem using RunebergVRPlugin. I wanted to derive a pawn class from RunebergVR\_Pawn and there were compile errors. I had tried many things including adding paths in the project settings, but nothing worked. Finally I found the following page on the wiki and at first it did not solve my problem. So I undid all my experiments, removed paths from project settings and did _only_ what the wiki page said and finally my project compiled.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

FYI: Even though everything compiles, there are errors showing on the VS Error List window and squiggly lines are showing from missing intellisense. There are no errors in the Build Output though, so seems better than not compiling at all.
