# How to include the header file from a plugin

**URL:** <https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341>\
**Category:** Plugins\
**Tags:** include, unreal-engine, Plugins, question\
**Created:** [July 16, 2014, 9:07am UTC](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341 "2014-07-16T09:07:44Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![virtualfilmer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/virtualfilmer/32/940767_2.png) [@virtualfilmer](https://forums.unrealengine.com/u/virtualfilmer)\
**Post date:** [May 21, 2024, 8:40pm UTC](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341/21 "2024-05-21T20:40:31Z")

</div>

I seem to be able to do that (I’m trying to access the Sequencer from a plugin, and your advice let me do that!).

But even though I’ve added “Sequencer” and “LevelSequence” to the ‘PublicDependencyModuleNames.AddRange’ statement, when I use Live Code to compile I continually get this error:

```auto
  [1/2] Compile [x64] etbbb.cpp
  F:\UEPROJECTS\MakePlugins7\Plugins\etbbb\Source\etbbb\Private\etbbb.cpp(68): error C2248: 'USequencerSettings::bLeftMouseDragDoesMarquee': cannot access protected member declared in class 'USequencerSettings'
  C:\Program Files\Epic Games\UE_5.4\Engine\Source\Editor\Sequencer\Public\SequencerSettings.h(579): note: see declaration of 'USequencerSettings::bLeftMouseDragDoesMarquee'

```

I don’t really understand what a ‘protected member class’ is, or how to change them. (I’m not good at C++ lol)

---

<div class="post-metadata">

**Author:** ![Wasabi.in](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wasabi.in](https://forums.unrealengine.com/u/Wasabi.in)\
**Post date:** [June 12, 2024, 3:13pm UTC](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341/22 "2024-06-12T15:13:29Z")

</div>

Hi virtualfilmer,

My understanding from your error snippet is that you are trying to access a boolean variable `bLeftMouseDragDoesMarquee` that is marked as `protected`, in the class `USequencerSettings`.

> [@virtualfilmer](#):
>
> I don’t really understand what a ‘protected member class’ is

If you navigate to that file, you should see something like:

```auto
protected:
    . . .
    bool bLeftMouseDragDoesMarquee = false;

```

The “protected member” in the error refers to this protected variable. And it can only be accessed by a class that inherits `USequencerSettings` - [see this](https://dev.epicgames.com/documentation/es-es/uefn/specifiers-and-attributes-in-verse#accessspecifiers). You could modify the source code and change the access specifier to be `public` to expose it to all classes but it might break the plugin if you mess with the variable.

With that being said - If it is not you who is trying to access that variable, but rather it is the plugin itself, you may need to try a different approach if the above doesn’t work. Such as:

1. might require you to add more modules to the list
2. adding it inside PrivateDependencyModuleNames instead (though I have no idea if it will make any difference)

or general workarounds like:

1. closing the editor and Rebuilding the app in VisualStudio a couple of times (Clean Solution =\> Rebuild Soln). And reopen editor
2. Deleting the .sln and regenerating it
3. deleting directories Binaries/, Intermediate/, DerivedDataCache/, Saved/ (take a backup first if necessary) and rebuild.

Hope it helps. 😄

Regards,  
Wasabi.

---

<div class="post-metadata">

**Author:** ![huiyao8761380](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@huiyao8761380](https://forums.unrealengine.com/u/huiyao8761380)\
**Post date:** [September 30, 2024, 8:55am UTC](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341/23 "2024-09-30T08:55:23Z")

</div>

Here’s my solution:: Import my OpenRTSCamera pulgin into \< project \>.build.cs and use RTSSelectable inside.

\< project \>.build.cs

```auto
// Copyright Epic Games, Inc. All Rights Reserved.

using System.IO;
using UnrealBuildTool;

public class OpenRTS : ModuleRules
{
	public OpenRTS(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem", "AIModule", "Niagara", "EnhancedInput", "OpenRTSCamera" });
    }
}

```

Source include ;

```auto
#include "../../Plugins/OpenRTSCamera/Source/OpenRTSCamera/Public/RTSSelectable.h"

```

Finally, rebuild the project.

[Previous page](https://forums.unrealengine.com/t/how-to-include-the-header-file-from-a-plugin/288341.md?page=1)
